summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio.c74
-rw-r--r--src/core.c274
-rw-r--r--src/easings.c50
-rw-r--r--src/gl.c2
-rw-r--r--src/lights.c26
-rw-r--r--src/lua_core.c38
-rw-r--r--src/models.c160
-rw-r--r--src/rgui.c88
-rw-r--r--src/rlgl.c78
-rw-r--r--src/rmath.c208
-rw-r--r--src/shapes.c85
-rw-r--r--src/state.c1
-rw-r--r--src/text.c24
-rw-r--r--src/textures.c180
14 files changed, 662 insertions, 626 deletions
diff --git a/src/audio.c b/src/audio.c
index 1332446..3ba9cb0 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -5,7 +5,7 @@
static bool validSound( size_t id ) {
if ( id < 0 || state->soundCount < id || state->sounds[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid sound", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid sound", id );
return false;
}
else {
@@ -15,7 +15,7 @@ static bool validSound( size_t id ) {
static bool validWave( size_t id ) {
if ( id < 0 || state->waveCount < id || state->waves[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid wave", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid wave", id );
return false;
}
else {
@@ -25,7 +25,7 @@ static bool validWave( size_t id ) {
static bool validMusic( size_t id ) {
if ( id < 0 || state->musicCount < id || state->musics[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid music", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid music", id );
return false;
}
else {
@@ -134,7 +134,7 @@ Set master volume ( listener )
*/
int laudioSetMasterVolume( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMasterVolume( float volume )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMasterVolume( float volume )" );
lua_pushboolean( L, false );
return 1;
}
@@ -160,7 +160,7 @@ Load sound from file
*/
int laudioLoadSound( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadSound( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadSound( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -187,7 +187,7 @@ Load wave data from file
*/
int laudioLoadWave( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadWave( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadWave( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -214,7 +214,7 @@ Load sound from wave data
*/
int laudioLoadSoundFromWave( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadSoundFromWave( Wave wave )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadSoundFromWave( Wave wave )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -241,7 +241,7 @@ Unload sound
*/
int laudioUnloadSound( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadSound( Sound sound )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadSound( Sound sound )" );
lua_pushboolean( L, false );
return 1;
}
@@ -268,7 +268,7 @@ Unload wave data
*/
int laudioUnloadWave( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadWave( Wave wave )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadWave( Wave wave )" );
lua_pushboolean( L, false );
return 1;
}
@@ -295,7 +295,7 @@ Export wave data to file, returns true on success
*/
int laudioExportWave( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportWave( Wave wave, string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ExportWave( Wave wave, string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -320,7 +320,7 @@ Export wave sample data to code (.h), returns true on success
*/
int laudioExportWaveAsCode( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportWaveAsCode( Wave wave, string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ExportWaveAsCode( Wave wave, string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -349,7 +349,7 @@ Play a sound
*/
int laudioPlaySound( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.PlaySound( Sound sound )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.PlaySound( Sound sound )" );
lua_pushboolean( L, false );
return 1;
}
@@ -375,7 +375,7 @@ Stop playing a sound
*/
int laudioStopSound( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.StopSound( Sound sound )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.StopSound( Sound sound )" );
lua_pushboolean( L, false );
return 1;
}
@@ -401,7 +401,7 @@ Pause a sound
*/
int laudioPauseSound( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.PauseSound( Sound sound )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.PauseSound( Sound sound )" );
lua_pushboolean( L, false );
return 1;
}
@@ -427,7 +427,7 @@ Resume a paused sound
*/
int laudioResumeSound( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ResumeSound( Sound sound )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ResumeSound( Sound sound )" );
lua_pushboolean( L, false );
return 1;
}
@@ -453,7 +453,7 @@ Check if a sound is currently playing
*/
int laudioIsSoundPlaying( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsSoundPlaying( Sound sound )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsSoundPlaying( Sound sound )" );
lua_pushnil( L );
return 1;
}
@@ -478,7 +478,7 @@ Set volume for a sound ( 1.0 is max level )
*/
int laudioSetSoundVolume( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetSoundVolume( Sound sound, float volume )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetSoundVolume( Sound sound, float volume )" );
lua_pushboolean( L, false );
return 1;
}
@@ -505,7 +505,7 @@ Set pitch for a sound ( 1.0 is base level )
*/
int laudioSetSoundPitch( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetSoundPitch( Sound sound, float pitch )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetSoundPitch( Sound sound, float pitch )" );
lua_pushboolean( L, false );
return 1;
}
@@ -532,7 +532,7 @@ Set pan for a sound ( 0.5 is center )
*/
int laudioSetSoundPan( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetSoundPan( Sound sound, float pitch )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetSoundPan( Sound sound, float pitch )" );
lua_pushboolean( L, false );
return 1;
}
@@ -559,7 +559,7 @@ Convert wave data to desired format
*/
int laudioWaveFormat( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.WaveFormat( Wave wave, int sampleRate, int sampleSize, int channels )" );
lua_pushboolean( L, false );
return 1;
}
@@ -588,7 +588,7 @@ Copy a wave to a new wave
*/
int laudioWaveCopy( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.WaveCopy( Wave wave )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.WaveCopy( Wave wave )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -615,7 +615,7 @@ Crop a wave to defined samples range
*/
int laudioWaveCrop( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.WaveCrop( Wave wave, int initSample, int finalSample )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.WaveCrop( Wave wave, int initSample, int finalSample )" );
lua_pushboolean( L, false );
return 1;
}
@@ -647,7 +647,7 @@ Load music stream from file
*/
int laudioLoadMusicStream( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadMusicStream( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadMusicStream( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -673,7 +673,7 @@ Start music playing
*/
int laudioPlayMusicStream( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.PlayMusicStream( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.PlayMusicStream( Music music )" );
lua_pushboolean( L, false );
return 1;
}
@@ -699,7 +699,7 @@ Check if music is playing
*/
int laudioIsMusicStreamPlaying( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMusicStreamPlaying( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsMusicStreamPlaying( Music music )" );
lua_pushnil( L );
return 1;
}
@@ -724,7 +724,7 @@ Updates buffers for music streaming
*/
int laudioUpdateMusicStream( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateMusicStream( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateMusicStream( Music music )" );
lua_pushboolean( L, false );
return 1;
}
@@ -750,7 +750,7 @@ Stop music playing
*/
int laudioStopMusicStream( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.StopMusicStream( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.StopMusicStream( Music music )" );
lua_pushboolean( L, false );
return 1;
}
@@ -776,7 +776,7 @@ Pause music playing
*/
int laudioPauseMusicStream( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.PauseMusicStream( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.PauseMusicStream( Music music )" );
lua_pushboolean( L, false );
return 1;
}
@@ -802,7 +802,7 @@ Resume playing paused music
*/
int laudioResumeMusicStream( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ResumeMusicStream( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ResumeMusicStream( Music music )" );
lua_pushboolean( L, false );
return 1;
}
@@ -828,7 +828,7 @@ Seek music to a position ( in seconds )
*/
int laudioSeekMusicStream( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SeekMusicStream( Music music, float position )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SeekMusicStream( Music music, float position )" );
lua_pushboolean( L, false );
return 1;
}
@@ -855,7 +855,7 @@ Set volume for music ( 1.0 is max level )
*/
int laudioSetMusicVolume( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMusicVolume( Music music, float volume )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMusicVolume( Music music, float volume )" );
lua_pushboolean( L, false );
return 1;
}
@@ -882,7 +882,7 @@ Set pitch for a music ( 1.0 is base level )
*/
int laudioSetMusicPitch( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMusicPitch( Music music, float pitch )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMusicPitch( Music music, float pitch )" );
lua_pushboolean( L, false );
return 1;
}
@@ -909,7 +909,7 @@ Set pan for a music ( 0.5 is center )
*/
int laudioSetMusicPan( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMusicPan( Music music, float pan )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMusicPan( Music music, float pan )" );
lua_pushboolean( L, false );
return 1;
}
@@ -936,7 +936,7 @@ Set looping for a music
*/
int laudioSetMusicLooping( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isboolean( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMusicLooping( Music music, bool looping )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMusicLooping( Music music, bool looping )" );
lua_pushboolean( L, false );
return 1;
}
@@ -963,7 +963,7 @@ Get looping of a music
*/
int laudioGetMusicLooping( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMusicLooping( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMusicLooping( Music music )" );
lua_pushnil( L );
return 1;
}
@@ -988,7 +988,7 @@ Get music time length ( in seconds )
*/
int laudioGetMusicTimeLength( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMusicTimeLength( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMusicTimeLength( Music music )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1013,7 +1013,7 @@ Get current music time played ( in seconds )
*/
int laudioGetMusicTimePlayed( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMusicTimePlayed( Music music )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMusicTimePlayed( Music music )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/core.c b/src/core.c
index ab65626..a4bd9cd 100644
--- a/src/core.c
+++ b/src/core.c
@@ -51,7 +51,7 @@ static void checkShaderRealloc( int i ) {
bool validShader( size_t id ) {
if ( id < 0 || state->shaderCount < id || state->shaders[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid shader", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid shader", id );
return false;
}
else {
@@ -151,7 +151,7 @@ Set monitor for the current window (fullscreen mode)
*/
int lcoreSetWindowMonitor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowMonitor( int monitor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetWindowMonitor( int monitor )" );
lua_pushboolean( L, false );
return 1;
}
@@ -171,7 +171,7 @@ Set window position on screen
*/
int lcoreSetWindowPosition( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowPosition( Vector2 pos )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetWindowPosition( Vector2 pos )" );
lua_pushboolean( L, false );
return 1;
}
@@ -193,7 +193,7 @@ Set window dimensions
*/
int lcoreSetWindowSize( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowSize( Vector2 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetWindowSize( Vector2 size )" );
lua_pushboolean( L, false );
return 1;
}
@@ -215,7 +215,7 @@ Set window minimum dimensions ( for FLAG_WINDOW_RESIZABLE )
*/
int lcoreSetWindowMinSize( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowMinSize( Vector2 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetWindowMinSize( Vector2 size )" );
lua_pushboolean( L, false );
return 1;
}
@@ -237,7 +237,7 @@ Get specified monitor position
*/
int lcoreGetMonitorPosition( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorPosition( int monitor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMonitorPosition( int monitor )" );
lua_pushnil( L );
return 1;
}
@@ -258,7 +258,7 @@ Get specified monitor size
*/
int lcoreGetMonitorSize( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorSize( int monitor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMonitorSize( int monitor )" );
lua_pushnil( L );
return 1;
}
@@ -308,7 +308,7 @@ Set window configuration state using flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_R
*/
int lcoreSetWindowState( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowState( int flags )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetWindowState( int flags )" );
lua_pushboolean( L, false );
return 1;
}
@@ -330,7 +330,7 @@ Check if one specific window flag is enabled ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW
*/
int lcoreIsWindowState( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsWindowState( int flags )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsWindowState( int flags )" );
lua_pushnil( L );
return 1;
}
@@ -350,7 +350,7 @@ Clear window configuration state flags ( FLAG_FULLSCREEN_MODE, FLAG_WINDOW_RESIZ
*/
int lcoreClearWindowState( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ClearWindowState( int flag )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ClearWindowState( int flag )" );
lua_pushnil( L );
return 1;
}
@@ -384,7 +384,7 @@ Set icon for window ( Only PLATFORM_DESKTOP )
*/
int lcoreSetWindowIcon( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowIcon( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetWindowIcon( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -411,7 +411,7 @@ Set title for window ( Only PLATFORM_DESKTOP )
*/
int lcoreSetWindowTitle( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetWindowTitle( string title )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetWindowTitle( string title )" );
lua_pushboolean( L, false );
return 1;
}
@@ -455,7 +455,7 @@ Get specified monitor physical size in millimetres
*/
int lcoreGetMonitorPhysicalSize( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorPhysicalSize( int monitor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMonitorPhysicalSize( int monitor )" );
lua_pushboolean( L, false );
return 1;
}
@@ -477,7 +477,7 @@ Get specified monitor refresh rate
*/
int lcoreGetMonitorRefreshRate( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorRefreshRate( int monitor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMonitorRefreshRate( int monitor )" );
lua_pushboolean( L, false );
return 1;
}
@@ -511,7 +511,7 @@ Get the human-readable, UTF-8 encoded name of the monitor
*/
int lcoreGetMonitorName( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMonitorName( int monitor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMonitorName( int monitor )" );
lua_pushboolean( L, false );
return 1;
}
@@ -543,7 +543,7 @@ Set clipboard text content
*/
int lcoreSetClipboardText( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetClipboardText( string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetClipboardText( string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -579,7 +579,7 @@ Set target FPS ( maximum )
*/
int lcoreSetTargetFPS( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTargetFPS( int fps )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetTargetFPS( int fps )" );
lua_pushboolean( L, false );
return 1;
}
@@ -644,7 +644,7 @@ Takes a screenshot of current screen ( filename extension defines format )
*/
int lcoreTakeScreenshot( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.TakeScreenshot( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.TakeScreenshot( string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -664,7 +664,7 @@ Setup init configuration flags ( view FLAGS )
*/
int lcoreSetConfigFlags( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetConfigFlags( int flags )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetConfigFlags( int flags )" );
lua_pushboolean( L, false );
return 1;
}
@@ -686,7 +686,7 @@ Show trace log messages ( LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR... )
*/
int lcoreTraceLog( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.TraceLog( int logLevel, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.TraceLog( int logLevel, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -708,7 +708,7 @@ Set the current threshold ( minimum ) log level
*/
int lcoreSetTraceLogLevel( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTraceLogLevel( int logLevel )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetTraceLogLevel( int logLevel )" );
lua_pushboolean( L, false );
return 1;
}
@@ -721,6 +721,40 @@ int lcoreSetTraceLogLevel( lua_State *L ) {
}
/*
+> success = RL.SetLogLevelInvalid( int logLevel )
+
+Set the log level for bad function calls and invalid data formats.
+
+- Failure return false
+- Success return true
+*/
+int lcoreSetLogLevelInvalid( lua_State *L ) {
+ if ( !lua_isnumber( L, 1 ) ) {
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetLogLevelInvalid( int logLevel )" );
+ lua_pushboolean( L, false );
+ return 1;
+ }
+ state->logLevelInvalid = lua_tointeger( L, 1 );
+
+ lua_pushboolean( L, true );
+
+ return 1;
+}
+
+/*
+> logLevel = RL.GetLogLevelInvalid()
+
+Get the log level for bad function calls and invalid data formats.
+
+- Success return int
+*/
+int lcoreGetLogLevelInvalid( lua_State *L ) {
+ lua_pushinteger( L, state->logLevelInvalid );
+
+ return 1;
+}
+
+/*
> success = RL.OpenURL( string url )
Open URL with default system browser ( If available )
@@ -730,7 +764,7 @@ Open URL with default system browser ( If available )
*/
int lcoreOpenURL( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.OpenURL( string url )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.OpenURL( string url )" );
lua_pushboolean( L, false );
return 1;
}
@@ -828,7 +862,7 @@ Set background color ( framebuffer clear color )
*/
int lcoreClearBackground( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ClearBackground( Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ClearBackground( Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -872,7 +906,7 @@ Begin blending mode ( BLEND_ALPHA, BLEND_ADDITIVE, BLEND_MULTIPLIED... )
*/
int lcoreBeginBlendMode( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginBlendMode( int mode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.BeginBlendMode( int mode )" );
lua_pushboolean( L, false );
return 1;
}
@@ -905,7 +939,7 @@ Begin scissor mode ( define screen area for following drawing )
*/
int lcoreBeginScissorMode( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginScissorMode( Rectangle rectange )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.BeginScissorMode( Rectangle rectange )" );
lua_pushboolean( L, false );
return 1;
}
@@ -943,7 +977,7 @@ NOTE: Set nil if no shader
*/
int lcoreLoadShader( lua_State *L ) {
if ( !( lua_isstring( L, 1 ) || lua_isnil( L, 1 ) ) || !( lua_isstring( L, 2 ) || lua_isnil( L, 2 ) ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadShader( string vsFileName, string fsFileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadShader( string vsFileName, string fsFileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -998,7 +1032,7 @@ NOTE: Set nil if no shader
int lcoreLoadShaderFromMemory( lua_State *L ) {
if ( !( lua_isstring( L, 1 ) || lua_isnil( L, 1 ) ) || !( lua_isstring( L, 2 ) || lua_isnil( L, 2 ) ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadShaderFromMemory( string vsCode, string fsCode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadShaderFromMemory( string vsCode, string fsCode )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1050,7 +1084,7 @@ Begin custom shader drawing
*/
int lcoreBeginShaderMode( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginShaderMode( Shader shader )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.BeginShaderMode( Shader shader )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1087,7 +1121,7 @@ Get shader uniform location
*/
int lcoreGetShaderLocation( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetShaderLocation( Shader shader, string uniformName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetShaderLocation( Shader shader, string uniformName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1112,7 +1146,7 @@ Get shader attribute location
*/
int lcoreGetShaderLocationAttrib( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetShaderLocationAttrib( Shader shader, string attribName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetShaderLocationAttrib( Shader shader, string attribName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1137,7 +1171,7 @@ Set shader location index
*/
int lcoreSetShaderLocationIndex( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetShaderLocationIndex( Shader shader, int shaderLocationIndex, int location )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1165,7 +1199,7 @@ Get shader location index
*/
int lcoreGetShaderLocationIndex( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetShaderLocationIndex( Shader shader, int shaderLocationIndex )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetShaderLocationIndex( Shader shader, int shaderLocationIndex )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1191,7 +1225,7 @@ Set shader uniform value ( matrix 4x4 )
*/
int lcoreSetShaderValueMatrix( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetShaderValueMatrix( Shader shader, int locIndex, Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1219,7 +1253,7 @@ Set shader uniform value for texture ( sampler2d )
*/
int lcoreSetShaderValueTexture( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !isValidTexture( L, 3, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetShaderValueTexture( Shader shader, int locIndex, Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1248,7 +1282,7 @@ NOTE: Even one value should be in table
*/
int lcoreSetShaderValue( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetShaderValue( Shader shader, int locIndex, number{} values, int uniformType )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1306,7 +1340,7 @@ NOTE: Even one value should be in table
int lcoreSetShaderValueV( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetShaderValueV( Shader shader, int locIndex, number{} values, int uniformType, int count )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1362,7 +1396,7 @@ Unload shader from GPU memory ( VRAM )
*/
int lcoreUnloadShader( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadShader( Shader shader )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadShader( Shader shader )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1393,7 +1427,7 @@ Detect if a key has been pressed once
*/
int lcoreIsKeyPressed( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyPressed( int key )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsKeyPressed( int key )" );
lua_pushnil( L );
return 1;
}
@@ -1414,7 +1448,7 @@ Detect if a key is being pressed
*/
int lcoreIsKeyDown( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyDown( int key )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsKeyDown( int key )" );
lua_pushnil( L );
return 1;
}
@@ -1435,7 +1469,7 @@ Detect if a key has been released once
*/
int lcoreIsKeyReleased( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyReleased( int key )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsKeyReleased( int key )" );
lua_pushnil( L );
return 1;
}
@@ -1456,7 +1490,7 @@ Check if a key is NOT being pressed
*/
int lcoreIsKeyUp( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsKeyUp( int key )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsKeyUp( int key )" );
lua_pushnil( L );
return 1;
}
@@ -1500,7 +1534,7 @@ Set a custom key to exit program ( default is ESC )
*/
int lcoreSetExitKey( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetExitKey( int key )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetExitKey( int key )" );
lua_pushnil( L );
return 1;
}
@@ -1532,7 +1566,7 @@ this function returns nil but does not emit an error.
*/
int lcoreGetKeyName( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetKeyName( int key, int scancode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetKeyName( int key, int scancode )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1562,7 +1596,7 @@ If the key is KEY_UNKNOWN or does not exist on the keyboard this method will ret
*/
int lcoreGetKeyScancode( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetKeyScancode( int key )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetKeyScancode( int key )" );
lua_pushnil( L );
return 1;
}
@@ -1587,7 +1621,7 @@ Detect if a gamepad is available
*/
int lcoreIsGamepadAvailable( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadAvailable( int gamepad )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsGamepadAvailable( int gamepad )" );
lua_pushnil( L );
return 1;
}
@@ -1608,7 +1642,7 @@ Detect if a gamepad button has been pressed once
*/
int lcoreIsGamepadButtonPressed( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadButtonPressed( int gamepad, int button )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsGamepadButtonPressed( int gamepad, int button )" );
lua_pushnil( L );
return 1;
}
@@ -1630,7 +1664,7 @@ Detect if a gamepad button is being pressed
*/
int lcoreIsGamepadButtonDown( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadButtonDown( int gamepad, int button )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsGamepadButtonDown( int gamepad, int button )" );
lua_pushnil( L );
return 1;
}
@@ -1652,7 +1686,7 @@ Detect if a gamepad button has been released once
*/
int lcoreIsGamepadButtonReleased( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGamepadButtonReleased( int gamepad, int button )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsGamepadButtonReleased( int gamepad, int button )" );
lua_pushnil( L );
return 1;
}
@@ -1674,7 +1708,7 @@ Return gamepad axis count for a gamepad
*/
int lcoreGetGamepadAxisCount( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetGamepadAxisCount( int gamepad )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetGamepadAxisCount( int gamepad )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1695,7 +1729,7 @@ Return axis movement value for a gamepad axis
*/
int lcoreGetGamepadAxisMovement( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetGamepadAxisMovement( int gamepad, int axis )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetGamepadAxisMovement( int gamepad, int axis )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1717,7 +1751,7 @@ Return gamepad internal name id
*/
int lcoreGetGamepadName( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetGamepadName( int gamepad )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetGamepadName( int gamepad )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1742,7 +1776,7 @@ Detect if a mouse button has been pressed once
*/
int lcoreIsMouseButtonPressed( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonPressed( int button )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsMouseButtonPressed( int button )" );
lua_pushnil( L );
return 1;
}
@@ -1763,7 +1797,7 @@ Detect if a mouse button is being pressed
*/
int lcoreIsMouseButtonDown( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonDown( int button )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsMouseButtonDown( int button )" );
lua_pushnil( L );
return 1;
}
@@ -1784,7 +1818,7 @@ Detect if a mouse button has been released once
*/
int lcoreIsMouseButtonReleased( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonReleased( int button )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsMouseButtonReleased( int button )" );
lua_pushnil( L );
return 1;
}
@@ -1805,7 +1839,7 @@ Check if a mouse button is NOT being pressed
*/
int lcoreIsMouseButtonUp( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsMouseButtonUp( int button )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsMouseButtonUp( int button )" );
lua_pushnil( L );
return 1;
}
@@ -1850,7 +1884,7 @@ Set mouse position XY
*/
int lcoreSetMousePosition( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMousePosition( Vector2 position )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMousePosition( Vector2 position )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1872,7 +1906,7 @@ Set mouse offset
*/
int lcoreSetMouseOffset( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMouseOffset( Vector2 offset )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMouseOffset( Vector2 offset )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1894,7 +1928,7 @@ Set mouse scaling
*/
int lcoreSetMouseScale( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMouseScale( Vector2 scale )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMouseScale( Vector2 scale )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1928,7 +1962,7 @@ Set mouse cursor
*/
int lcoreSetMouseCursor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMouseCursor( int cursor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMouseCursor( int cursor )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1954,7 +1988,7 @@ Get touch position XY for a touch point index ( relative to screen size )
*/
int lcoreGetTouchPosition( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTouchPosition( int index )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetTouchPosition( int index )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1975,7 +2009,7 @@ Get touch point identifier for given index
*/
int lcoreGetTouchPointId( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTouchPointId( int index )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetTouchPointId( int index )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2013,7 +2047,7 @@ Enable a set of gestures using flags
*/
int lcoreSetGesturesEnabled( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetGesturesEnabled( unsigned int flags )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetGesturesEnabled( unsigned int flags )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2035,7 +2069,7 @@ Check if a gesture have been detected
*/
int lcoreIsGestureDetected( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsGestureDetected( int gesture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsGestureDetected( int gesture )" );
lua_pushnil( L );
return 1;
}
@@ -2151,7 +2185,7 @@ Check if file exists
*/
int lcoreFileExists( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.FileExists( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.FileExists( string fileName )" );
lua_pushnil( L );
return 1;
}
@@ -2170,7 +2204,7 @@ Check if a directory path exists
*/
int lcoreDirectoryExists( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DirectoryExists( string dirPath )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DirectoryExists( string dirPath )" );
lua_pushnil( L );
return 1;
}
@@ -2189,7 +2223,7 @@ Check file extension ( Including point: .png, .wav )
*/
int lcoreIsFileExtension( lua_State *L ) {
if ( !lua_isstring( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsFileExtension( string fileName, string ext )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsFileExtension( string fileName, string ext )" );
lua_pushnil( L );
return 1;
}
@@ -2208,7 +2242,7 @@ Get file length in bytes ( NOTE: GetFileSize() conflicts with windows.h )
*/
int lcoreGetFileLength( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileLength( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFileLength( string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2227,7 +2261,7 @@ Get pointer to extension for a filename string ( Includes dot: '.png' )
*/
int lcoreGetFileExtension( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileExtension( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFileExtension( string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2246,7 +2280,7 @@ Get pointer to filename for a path string
*/
int lcoreGetFileName( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileName( string filePath )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFileName( string filePath )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2265,7 +2299,7 @@ Get filename string without extension ( Uses static string )
*/
int lcoreGetFileNameWithoutExt( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileNameWithoutExt( string filePath )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFileNameWithoutExt( string filePath )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2284,7 +2318,7 @@ Get full path for a given fileName with path ( Uses static string )
*/
int lcoreGetDirectoryPath( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetDirectoryPath( string filePath )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetDirectoryPath( string filePath )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2303,7 +2337,7 @@ Get previous directory path for a given path ( Uses static string )
*/
int lcoreGetPrevDirectoryPath( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetPrevDirectoryPath( string dirPath )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetPrevDirectoryPath( string dirPath )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2334,7 +2368,7 @@ Load directory filepaths
*/
int lcoreLoadDirectoryFiles( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadDirectoryFiles( string dirPath )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadDirectoryFiles( string dirPath )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2361,7 +2395,7 @@ Load directory filepaths with extension filtering and recursive directory scan
*/
int lcoreLoadDirectoryFilesEx( lua_State *L ) {
if ( !lua_isstring( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isboolean( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadDirectoryFilesEx( string dirPath )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadDirectoryFilesEx( string dirPath )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2390,7 +2424,7 @@ Change working directory, return true on success
*/
int lcoreChangeDirectory( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ChangeDirectory( string directory )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ChangeDirectory( string directory )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2409,7 +2443,7 @@ Check if a given path is a file or a directory
*/
int lcoreIsPathFile( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsPathFile( string path )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsPathFile( string path )" );
lua_pushnil( L );
return 1;
}
@@ -2461,7 +2495,7 @@ Get file modification time ( Last write time )
*/
int lcoreGetFileModTime( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFileModTime( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFileModTime( string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2511,7 +2545,7 @@ Unload Camera2D
*/
int lcoreUnloadCamera2D( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadCamera2D( int Camera2D )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadCamera2D( int Camera2D )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2534,7 +2568,7 @@ Begin 2D mode with custom camera ( 2D )
*/
int lcoreBeginMode2D( lua_State *L ) {
if ( !isValidCamera2D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginMode2D( camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.BeginMode2D( camera2D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2567,7 +2601,7 @@ Set camera target ( rotation and zoom origin )
*/
int lcoreSetCamera2DTarget( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DTarget( camera2D camera, Vector2 target )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera2DTarget( camera2D camera, Vector2 target )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2590,7 +2624,7 @@ Set camera offset ( displacement from target )
*/
int lcoreSetCamera2DOffset( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DOffset( camera2D camera, Vector2 offset )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera2DOffset( camera2D camera, Vector2 offset )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2613,7 +2647,7 @@ Set camera rotation in degrees
*/
int lcoreSetCamera2DRotation( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DRotation( camera2D camera, float rotation )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera2DRotation( camera2D camera, float rotation )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2636,7 +2670,7 @@ Set camera zoom ( scaling ), should be 1.0f by default
*/
int lcoreSetCamera2DZoom( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera2DZoom( camera2D camera, float zoom )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera2DZoom( camera2D camera, float zoom )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2659,7 +2693,7 @@ Get camera2D target
*/
int lcoreGetCamera2DTarget( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DTarget( camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera2DTarget( camera2D camera )" );
lua_pushnil( L );
return 1;
}
@@ -2679,7 +2713,7 @@ Get camera2D offset
*/
int lcoreGetCamera2DOffset( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DOffset( camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera2DOffset( camera2D camera )" );
lua_pushnil( L );
return 1;
}
@@ -2699,7 +2733,7 @@ Get camera2D rotation
*/
int lcoreGetCamera2DRotation( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DRotation( camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera2DRotation( camera2D camera )" );
lua_pushnil( L );
return 1;
}
@@ -2719,7 +2753,7 @@ Get camera2D zoom
*/
int lcoreGetCamera2DZoom( lua_State *L ) {
if ( !isValidCamera2D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera2DZoom( camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera2DZoom( camera2D camera )" );
lua_pushnil( L );
return 1;
}
@@ -2771,7 +2805,7 @@ Unload Camera3D
*/
int lcoreUnloadCamera3D( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadCamera3D( int Camera3D )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadCamera3D( int Camera3D )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2794,7 +2828,7 @@ Begin 3D mode with custom camera ( 3D )
*/
int lcoreBeginMode3D( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginMode3D( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.BeginMode3D( camera3D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2827,7 +2861,7 @@ Set camera position ( Remember to call "RL.UpdateCamera3D()" to apply changes )
*/
int lcoreSetCamera3DPosition( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DPosition( camera3D camera, Vector3 position )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera3DPosition( camera3D camera, Vector3 position )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2850,7 +2884,7 @@ Set camera target it looks-at
*/
int lcoreSetCamera3DTarget( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DTarget( camera3D camera, Vector3 target )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera3DTarget( camera3D camera, Vector3 target )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2873,7 +2907,7 @@ Set camera up vector ( Rotation over it's axis )
*/
int lcoreSetCamera3DUp( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DUp( camera3D camera, Vector3 up )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera3DUp( camera3D camera, Vector3 up )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2896,7 +2930,7 @@ Set camera field-of-view apperture in Y ( degrees ) in perspective, used as near
*/
int lcoreSetCamera3DFovy( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DFovy( camera3D camera, float fovy )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera3DFovy( camera3D camera, float fovy )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2919,7 +2953,7 @@ Set camera projection mode ( CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC )
*/
int lcoreSetCamera3DProjection( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetCamera3DProjection( camera3D camera, int projection )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetCamera3DProjection( camera3D camera, int projection )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2942,7 +2976,7 @@ Get camera position
*/
int lcoreGetCamera3DPosition( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DPosition( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DPosition( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -2963,7 +2997,7 @@ Get camera target it looks-at
*/
int lcoreGetCamera3DTarget( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DTarget( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DTarget( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -2984,7 +3018,7 @@ Get camera up vector ( Rotation over it's axis )
*/
int lcoreGetCamera3DUp( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DUp( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DUp( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -3005,7 +3039,7 @@ Get camera field-of-view apperture in Y ( degrees ) in perspective, used as near
*/
int lcoreGetCamera3DFovy( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DFovy( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DFovy( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -3026,7 +3060,7 @@ Get camera projection mode
*/
int lcoreGetCamera3DProjection( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DProjection( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DProjection( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -3047,7 +3081,7 @@ Returns the cameras forward vector ( normalized )
*/
int lcoreGetCamera3DForward( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DForward( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DForward( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -3069,7 +3103,7 @@ Note: The up vector might not be perpendicular to the forward vector
*/
int lcoreGetCamera3DUpNormalized( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DUpNormalized( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DUpNormalized( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -3090,7 +3124,7 @@ Returns the cameras right vector ( normalized )
*/
int lcoreGetCamera3DRight( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DRight( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DRight( camera3D camera )" );
lua_pushnil( L );
return 1;
}
@@ -3111,7 +3145,7 @@ Moves the camera in it's forward direction
*/
int lcoreCamera3DMoveForward( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) || !lua_isboolean( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DRight( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DRight( camera3D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3135,7 +3169,7 @@ Moves the camera in it's up direction
*/
int lcoreCamera3DMoveUp( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Camera3DMoveUp( camera3D camera, float distance )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Camera3DMoveUp( camera3D camera, float distance )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3158,7 +3192,7 @@ Moves the camera target in it's current right direction
*/
int lcoreCamera3DMoveRight( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) || !lua_isboolean( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Camera3DMoveRight( camera3D camera, float distance, bool moveInWorldPlane )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Camera3DMoveRight( camera3D camera, float distance, bool moveInWorldPlane )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3182,7 +3216,7 @@ Moves the camera position closer/farther to/from the camera target
*/
int lcoreCamera3DMoveToTarget( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Camera3DMoveToTarget( camera3D camera, float delta )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Camera3DMoveToTarget( camera3D camera, float delta )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3208,7 +3242,7 @@ Note: angle must be provided in radians
*/
int lcoreCamera3DYaw( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) || !lua_isboolean( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Camera3DYaw( camera3D camera, float angle, bool rotateAroundTarget )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Camera3DYaw( camera3D camera, float angle, bool rotateAroundTarget )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3237,7 +3271,7 @@ NOTE: angle must be provided in radians
int lcoreCamera3DPitch( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) || !lua_isboolean( L, 3 )
|| !lua_isboolean( L, 4 ) || !lua_isboolean( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Camera3DYaw( camera3D camera, float angle, bool rotateAroundTarget )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Camera3DYaw( camera3D camera, float angle, bool rotateAroundTarget )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3265,7 +3299,7 @@ Note: angle must be provided in radians
*/
int lcoreCamera3DRoll( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Camera3DRoll( camera3D camera, float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Camera3DRoll( camera3D camera, float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3288,7 +3322,7 @@ Returns the camera view matrix
*/
int lcoreGetCamera3DViewMatrix( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DViewMatrix( camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DViewMatrix( camera3D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3309,7 +3343,7 @@ Returns the camera projection matrix
*/
int lcoreGetCamera3DProjectionMatrix( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCamera3DProjectionMatrix( camera3D camera, float aspect )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCamera3DProjectionMatrix( camera3D camera, float aspect )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3331,7 +3365,7 @@ Update camera position for selected mode
*/
int lcoreUpdateCamera3D( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateCamera3D( camera3D camera, int mode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateCamera3D( camera3D camera, int mode )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3354,7 +3388,7 @@ Update camera movement, movement/rotation values should be provided by user
*/
int lcoreUpdateCamera3DPro( lua_State *L ) {
if ( !isValidCamera3D( L, 1, false ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateCamera3DPro( camera3D camera, Vector3 movement, Vector3 rotation, float zoom )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateCamera3DPro( camera3D camera, Vector3 movement, Vector3 rotation, float zoom )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3383,7 +3417,7 @@ Get a ray trace from mouse position
*/
int lcoreGetMouseRay( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !isValidCamera3D( L, 2, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMouseRay( Vector2 mousePosition, Camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMouseRay( Vector2 mousePosition, Camera3D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3405,7 +3439,7 @@ Get camera transform matrix ( view matrix )
*/
int lcoreGetCameraMatrix( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCameraMatrix( Camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCameraMatrix( Camera3D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3426,7 +3460,7 @@ Get camera 2d transform matrix
*/
int lcoreGetCameraMatrix2D( lua_State *L ) {
if ( !isValidCamera2D( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCameraMatrix2D( Camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCameraMatrix2D( Camera2D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3446,7 +3480,7 @@ Get the screen space position for a 3d world space position
*/
int lcoreGetWorldToScreen( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !isValidCamera3D( L, 2, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetWorldToScreen( Vector3 position, Camera3D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetWorldToScreen( Vector3 position, Camera3D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3468,7 +3502,7 @@ Get size position for a 3d world space position
*/
int lcoreGetWorldToScreenEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !isValidCamera3D( L, 2, true ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetWorldToScreenEx( Vector3 position, Camera3D camera, Vector2 size )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3491,7 +3525,7 @@ Get the screen space position for a 2d camera world space position
*/
int lcoreGetWorldToScreen2D( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !isValidCamera2D( L, 2, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetWorldToScreen2D( Vector2 position, Camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetWorldToScreen2D( Vector2 position, Camera2D camera )" );
lua_pushboolean( L, false );
return 1;
}
@@ -3513,7 +3547,7 @@ Get the world space position for a 2d camera screen space position
*/
int lcoreGetScreenToWorld2D( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !isValidCamera2D( L, 2, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetScreenToWorld2D( Vector2 position, Camera2D camera )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetScreenToWorld2D( Vector2 position, Camera2D camera )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/easings.c b/src/easings.c
index 7176d50..f4092f0 100644
--- a/src/easings.c
+++ b/src/easings.c
@@ -18,7 +18,7 @@ Ease linear
*/
int leasingsEaseLinear( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseLinear( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseLinear( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -46,7 +46,7 @@ Ease sine in
*/
int leasingsEaseSineIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseSineIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseSineIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -70,7 +70,7 @@ Ease sine out
*/
int leasingsEaseSineOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseSineOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseSineOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -94,7 +94,7 @@ Ease sine in out
*/
int leasingsEaseSineInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseSineInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseSineInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -122,7 +122,7 @@ Ease circle in
*/
int leasingsEaseCircIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCircIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseCircIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -146,7 +146,7 @@ Ease circle out
*/
int leasingsEaseCircOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCircOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseCircOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -170,7 +170,7 @@ Ease circle in out
*/
int leasingsEaseCircInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCircInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseCircInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -198,7 +198,7 @@ Ease cubic in
*/
int leasingsEaseCubicIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCubicIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseCubicIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -222,7 +222,7 @@ Ease cubic out
*/
int leasingsEaseCubicOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCubicOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseCubicOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -246,7 +246,7 @@ Ease cubic in out
*/
int leasingsEaseCubicInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseCubicInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseCubicInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -274,7 +274,7 @@ Ease quadratic in
*/
int leasingsEaseQuadIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseQuadIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseQuadIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -298,7 +298,7 @@ Ease quadratic out
*/
int leasingsEaseQuadOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseQuadOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseQuadOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -322,7 +322,7 @@ Ease quadratic in out
*/
int leasingsEaseQuadInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseQuadInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseQuadInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -350,7 +350,7 @@ Ease exponential in
*/
int leasingsEaseExpoIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseExpoIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseExpoIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -374,7 +374,7 @@ Ease exponential out
*/
int leasingsEaseExpoOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseExpoOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseExpoOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -398,7 +398,7 @@ Ease exponential in out
*/
int leasingsEaseExpoInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseExpoInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseExpoInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -426,7 +426,7 @@ Ease back in
*/
int leasingsEaseBackIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBackIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseBackIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -450,7 +450,7 @@ Ease back out
*/
int leasingsEaseBackOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBackOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseBackOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -474,7 +474,7 @@ Ease back in out
*/
int leasingsEaseBackInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBackInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseBackInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -502,7 +502,7 @@ Ease bounce in
*/
int leasingsEaseBounceIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBounceIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseBounceIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -526,7 +526,7 @@ Ease bounce out
*/
int leasingsEaseBounceOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBounceOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseBounceOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -550,7 +550,7 @@ Ease bounce in out
*/
int leasingsEaseBounceInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseBounceInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseBounceInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -578,7 +578,7 @@ Ease elastic in
*/
int leasingsEaseElasticIn( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseElasticIn( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseElasticIn( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -602,7 +602,7 @@ Ease elastic out
*/
int leasingsEaseElasticOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseElasticOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseElasticOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
@@ -626,7 +626,7 @@ Ease elastic in out
*/
int leasingsEaseElasticInOut( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.EaseElasticInOut( float t, float b, float c, float d )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.EaseElasticInOut( float t, float b, float c, float d )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/gl.c b/src/gl.c
index ceb9ff8..a6e0e0e 100644
--- a/src/gl.c
+++ b/src/gl.c
@@ -20,7 +20,7 @@ Use -1 RenderTexture for window framebuffer.
int lglBlitFramebuffer( lua_State *L ) {
if ( !isValidRenderTexture( L, 1, true ) || !isValidRenderTexture( L, 2, true ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.glBlitFramebuffer( RenderTexture srcTex, RenderTexture dstTex, Rectangle srcRect, Rectangle dstRect, int mask, int filter )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.glBlitFramebuffer( RenderTexture srcTex, RenderTexture dstTex, Rectangle srcRect, Rectangle dstRect, int mask, int filter )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/lights.c b/src/lights.c
index 70ac011..a7caf2c 100644
--- a/src/lights.c
+++ b/src/lights.c
@@ -24,7 +24,7 @@ static void checkLightRealloc( int i ) {
bool validLight( size_t id ) {
if ( id < 0 || state->lightCount < id || state->lights[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid light", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid light", id );
return false;
}
else {
@@ -61,7 +61,7 @@ Create a light and get shader locations
int llightsCreateLight( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_isnumber( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CreateLight( int type, Vector3 position, Vector3 target, Color color, Shader shader )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -88,7 +88,7 @@ Send light properties to shader
*/
int llightsUpdateLightValues( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateLightValues( Shader shader, Light light )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateLightValues( Shader shader, Light light )" );
lua_pushboolean( L, false );
return 1;
}
@@ -119,7 +119,7 @@ Set light type
*/
int llightsSetLightType( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetLightType( Light light, int type )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetLightType( Light light, int type )" );
lua_pushboolean( L, false );
return 1;
}
@@ -146,7 +146,7 @@ Set light position
*/
int llightsSetLightPosition( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetLightPosition( Light light, Vecto3 position )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetLightPosition( Light light, Vecto3 position )" );
lua_pushboolean( L, false );
return 1;
}
@@ -173,7 +173,7 @@ Set light target
*/
int llightsSetLightTarget( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetLightTarget( Light light, Vecto3 target )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetLightTarget( Light light, Vecto3 target )" );
lua_pushboolean( L, false );
return 1;
}
@@ -200,7 +200,7 @@ Set light color
*/
int llightsSetLightColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetLightColor( Light light, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetLightColor( Light light, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -227,7 +227,7 @@ Set light enabled
*/
int llightsSetLightEnabled( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isboolean( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetLightEnabled( Light light, bool enabled )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetLightEnabled( Light light, bool enabled )" );
lua_pushboolean( L, false );
return 1;
}
@@ -254,7 +254,7 @@ Get light type
*/
int llightsGetLightType( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetLightType( Light light )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetLightType( Light light )" );
lua_pushboolean( L, false );
return 1;
}
@@ -279,7 +279,7 @@ Get light position
*/
int llightsGetLightPosition( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetLightPosition( Light light )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetLightPosition( Light light )" );
lua_pushboolean( L, false );
return 1;
}
@@ -304,7 +304,7 @@ Get light target
*/
int llightsGetLightTarget( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetLightTarget( Light light )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetLightTarget( Light light )" );
lua_pushboolean( L, false );
return 1;
}
@@ -329,7 +329,7 @@ Get light color
*/
int llightsGetLightColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetLightColor( Light light )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetLightColor( Light light )" );
lua_pushboolean( L, false );
return 1;
}
@@ -354,7 +354,7 @@ Get light enabled
*/
int llightsIsLightEnabled( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsLightEnabled( Light light )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsLightEnabled( Light light )" );
lua_pushnil( L );
return 1;
}
diff --git a/src/lua_core.c b/src/lua_core.c
index 7e0ead3..c789be1 100644
--- a/src/lua_core.c
+++ b/src/lua_core.c
@@ -614,7 +614,7 @@ void defineGlobals() {
}
// Custom logging funtion
-void LogCustom( int logLevel, const char *text, va_list args ) {
+void logCustom( int logLevel, const char *text, va_list args ) {
char string[ STRING_LEN ] = {'\0'};
char msg[ STRING_LEN ] = {'\0'};
@@ -677,14 +677,12 @@ int luaTraceback( lua_State *L ) {
lua_pop( L, 1 );
return 1;
}
-
lua_getfield( L, -1, "traceback" );
if ( !lua_isfunction( L, -1 ) ) {
lua_pop( L, 2 );
return 1;
}
-
lua_pushvalue( L, 1 ); // pass error message
lua_pushinteger( L, 2 ); // skip this function and traceback
lua_call( L, 2, 1 ); // call debug.traceback
@@ -722,7 +720,7 @@ bool luaCallMain() {
int tracebackidx = lua_gettop( L );
/* Apply custom callback here. */
- SetTraceLogCallback( LogCustom );
+ SetTraceLogCallback( logCustom );
lua_getglobal( L, "RL" );
lua_getfield ( L, -1, "init" );
@@ -740,7 +738,7 @@ bool luaCallMain() {
}
lua_pop( L, -1 );
- return true;
+ return state->run;
}
void luaCallProcess() {
@@ -851,6 +849,8 @@ void luaRegister() {
assingGlobalFunction( "SetConfigFlags", lcoreSetConfigFlags );
assingGlobalFunction( "TraceLog", lcoreTraceLog );
assingGlobalFunction( "SetTraceLogLevel", lcoreSetTraceLogLevel );
+ assingGlobalFunction( "SetLogLevelInvalid", lcoreSetLogLevelInvalid );
+ assingGlobalFunction( "GetLogLevelInvalid", lcoreGetLogLevelInvalid );
assingGlobalFunction( "OpenURL", lcoreOpenURL );
/* Cursor. */
assingGlobalFunction( "ShowCursor", lcoreShowCursor );
@@ -1613,7 +1613,7 @@ bool isValidTexture( lua_State *L, int index, bool allowTable ) {
return true;
}
else {
- TraceLog( LOG_WARNING, "%s", "Error. Invalid Texture." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Invalid Texture." );
return false;
}
}
@@ -1633,7 +1633,7 @@ bool isValidRenderTexture( lua_State *L, int index, bool allowTable ) {
return true;
}
else {
- TraceLog( LOG_WARNING, "%s", "Error. Invalid RenderTexture." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Invalid RenderTexture." );
return false;
}
}
@@ -1653,7 +1653,7 @@ bool isValidCamera2D( lua_State *L, int index, bool allowTable ) {
return true;
}
else {
- TraceLog( LOG_WARNING, "%s", "Error. Invalid Camera2D." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Invalid Camera2D." );
return false;
}
}
@@ -1673,7 +1673,7 @@ bool isValidCamera3D( lua_State *L, int index, bool allowTable ) {
return true;
}
else {
- TraceLog( LOG_WARNING, "%s", "Error. Invalid Camera3D." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Invalid Camera3D." );
return false;
}
}
@@ -1688,7 +1688,7 @@ Color uluaGetColorIndex( lua_State *L, int index ) {
Color color = { 0, 0, 0, 255 };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong color value. Returning { 0, 0, 0, 255 }" );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong color value. Returning { 0, 0, 0, 255 }" );
return color;
}
// int t = lua_gettop( L ), i = 0;
@@ -1744,7 +1744,7 @@ Vector2 uluaGetVector2Index( lua_State *L, int index ) {
Vector2 vector = { 0.0f, 0.0f };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong vector2 value. Returning { 0, 0 }" );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong vector2 value. Returning { 0, 0 }" );
return vector;
}
int t = index, i = 0;
@@ -1787,7 +1787,7 @@ Vector3 uluaGetVector3Index( lua_State *L, int index ) {
Vector3 vector = { 0.0f, 0.0f, 0.0f };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong vector3 value. Returning { 0, 0, 0 }" );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong vector3 value. Returning { 0, 0, 0 }" );
return vector;
}
int t = index, i = 0;
@@ -1836,7 +1836,7 @@ Vector4 uluaGetVector4Index( lua_State *L, int index ) {
Vector4 vector = { 0.0f, 0.0f, 0.0f, 0.0f };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong vector4 value. Returning { 0, 0, 0, 0 }" );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong vector4 value. Returning { 0, 0, 0, 0 }" );
return vector;
}
int t = index, i = 0;
@@ -1891,7 +1891,7 @@ Rectangle uluaGetRectangleIndex( lua_State *L, int index ) {
Rectangle rect = { 0.0f, 0.0f, 0.0f, 0.0f };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong rectangle value. Returning { 0, 0, 0, 0 }" );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong rectangle value. Returning { 0, 0, 0, 0 }" );
return rect;
}
@@ -1947,7 +1947,7 @@ Quaternion uluaGetQuaternionIndex( lua_State *L, int index ) {
Quaternion quaternion = { 0.0f, 0.0f, 0.0f, 0.0f };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong quaternion value. Returning { 0, 0, 0, 0 }" );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong quaternion value. Returning { 0, 0, 0, 0 }" );
return quaternion;
}
int t = index, i = 0;
@@ -2003,7 +2003,7 @@ Matrix uluaGetMatrixIndex( lua_State *L, int index ) {
float m[4][4];
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong matrix value. Returning MatrixIdentity." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong matrix value. Returning MatrixIdentity." );
return MatrixIdentity();
}
int t = index, i = 0;
@@ -2041,7 +2041,7 @@ BoundingBox uluaGetBoundingBoxIndex( lua_State *L, int index ) {
BoundingBox box = { .min = { 0.0, 0.0, 0.0 }, .max = { 0.0, 0.0, 0.0 } };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong boundingbox value. Returning { min{ 0, 0, 0 }, max{ 0, 0, 0 } }." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong boundingbox value. Returning { min{ 0, 0, 0 }, max{ 0, 0, 0 } }." );
return box;
}
int t = index, i = 0;
@@ -2085,7 +2085,7 @@ Ray uluaGetRayIndex( lua_State *L, int index ) {
Ray ray = { .position = { 0.0, 0.0, 0.0 }, .direction = { 0.0, 0.0, 0.0 } };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong ray value. Returning { position{ 0, 0, 0 }, direction{ 0, 0, 0 } }." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong ray value. Returning { position{ 0, 0, 0 }, direction{ 0, 0, 0 } }." );
return ray;
}
int t = index, i = 0;
@@ -2129,7 +2129,7 @@ NPatchInfo uluaGetNPatchInfoIndex( lua_State *L, int index ) {
NPatchInfo npatch = { .source = { 0.0, 0.0, 0.0, 0.0 }, .left = 0, .top = 0, .right = 0, .bottom = 0, .layout = NPATCH_NINE_PATCH };
if ( !lua_istable( L, index ) ) {
- TraceLog( LOG_WARNING, "%s", "Error. Wrong ray value. Returning { source = { 0.0, 0.0, 0.0, 0.0 }, left = 0, top = 0, right = 0, bottom = 0, layout = NPATCH_NINE_PATCH }." );
+ TraceLog( state->logLevelInvalid, "%s", "Error. Wrong ray value. Returning { source = { 0.0, 0.0, 0.0, 0.0 }, left = 0, top = 0, right = 0, bottom = 0, layout = NPATCH_NINE_PATCH }." );
return npatch;
}
int t = index, i = 0;
diff --git a/src/models.c b/src/models.c
index 97e930c..380d8cf 100644
--- a/src/models.c
+++ b/src/models.c
@@ -68,7 +68,7 @@ static void checkAnimationRealloc( int i ) {
static bool validMesh( size_t id ) {
if ( id < 0 || state->meshCount < id || state->meshes[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid mesh", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid mesh", id );
return false;
}
else {
@@ -78,7 +78,7 @@ static bool validMesh( size_t id ) {
static bool validMaterial( size_t id ) {
if ( id < 0 || state->materialCount < id || state->materials[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid material", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid material", id );
return false;
}
else {
@@ -88,7 +88,7 @@ static bool validMaterial( size_t id ) {
static bool validModel( size_t id ) {
if ( id < 0 || state->modelCount < id || state->models[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid model", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid model", id );
return false;
}
else {
@@ -98,7 +98,7 @@ static bool validModel( size_t id ) {
static bool validAnimation( size_t id ) {
if ( id < 0 || state->animationCount < id || state->animations[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid animation", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid animation", id );
return false;
}
else {
@@ -292,7 +292,7 @@ Draw a line in 3D world space
*/
int lmodelsDrawLine3D( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLine3D( Vector3 startPos, Vector3 endPos, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawLine3D( Vector3 startPos, Vector3 endPos, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -316,7 +316,7 @@ Draw a point in 3D space, actually a small line
*/
int lmodelsDrawPoint3D( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPoint3D( Vector3 position, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawPoint3D( Vector3 position, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -340,7 +340,7 @@ Draw a circle in 3D world space
int lmodelsDrawCircle3D( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCircle3D( Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -366,7 +366,7 @@ Draw a color-filled triangle ( Vertex in counter-clockwise order! )
*/
int lmodelsDrawTriangle3D( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTriangle3D( Vector3 v1, Vector3 v2, Vector3 v3, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -391,7 +391,7 @@ Draw cube
*/
int lmodelsDrawCube( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCube( Vector3 position, Vector3 size, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCube( Vector3 position, Vector3 size, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -415,7 +415,7 @@ Draw cube wires
*/
int lmodelsDrawCubeWires( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCubeWires( Vector3 position, Vector3 size, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCubeWires( Vector3 position, Vector3 size, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -439,7 +439,7 @@ Draw sphere
*/
int lmodelsDrawSphere( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawSphere( Vector3 centerPos, float radius, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawSphere( Vector3 centerPos, float radius, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -464,7 +464,7 @@ Draw sphere with extended parameters
int lmodelsDrawSphereEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawSphereEx( Vector3 centerPos, float radius, int rings, int slices, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -491,7 +491,7 @@ Draw sphere wires
int lmodelsDrawSphereWires( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawSphereWires( Vector3 centerPos, float radius, int rings, int slices, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -518,7 +518,7 @@ Draw a cylinder/cone
int lmodelsDrawCylinder( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCylinder( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -546,7 +546,7 @@ Draw a cylinder with base at startPos and top at endPos
int lmodelsDrawCylinderEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCylinderEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -574,7 +574,7 @@ Draw a cylinder/cone wires
int lmodelsDrawCylinderWires( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCylinderWires( Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -602,7 +602,7 @@ Draw a cylinder wires with base at startPos and top at endPos
int lmodelsDrawCylinderWiresEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCylinderWiresEx( Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -630,7 +630,7 @@ Draw a capsule with the center of its sphere caps at startPos and endPos
int lmodelsDrawCapsule( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCapsule( Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCapsule( Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -658,7 +658,7 @@ Draw capsule wireframe with the center of its sphere caps at startPos and endPos
int lmodelsDrawCapsuleWires( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCapsuleWires( Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCapsuleWires( Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -685,7 +685,7 @@ Draw a plane XZ
*/
int lmodelsDrawPlane( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPlane( Vector3 centerPos, Vector2 size, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawPlane( Vector3 centerPos, Vector2 size, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -709,7 +709,7 @@ Draw 3D textured quad. ( Texture coordinates opengl style 0.0 - 1.0 ).
*/
int lmodelDrawQuad3DTexture( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawQuad3DTexture( Texture2D texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawQuad3DTexture( Texture2D texture, Vector3{} vertices, Vector2{} texCoords, Color{} colors )" );
lua_pushboolean( L, false );
return 1;
}
@@ -788,7 +788,7 @@ Draw a ray line
*/
int lmodelsDrawRay( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRay( Ray ray, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRay( Ray ray, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -811,7 +811,7 @@ Draw a grid ( Centered at ( 0, 0, 0 ) )
*/
int lmodelsDrawGrid( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawGrid( int slices, float spacing )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawGrid( int slices, float spacing )" );
lua_pushboolean( L, false );
return 1;
}
@@ -838,7 +838,7 @@ Generate polygonal mesh
*/
int lmodelsGenMeshPoly( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshPoly( int sides, float radius )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshPoly( int sides, float radius )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -864,7 +864,7 @@ Generate plane mesh ( With subdivisions )
*/
int lmodelsGenMeshPlane( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshPlane( float width, float length, int resX, int resZ )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshPlane( float width, float length, int resX, int resZ )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -892,7 +892,7 @@ Generate cuboid mesh
*/
int lmodelsGenMeshCube( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCube( Vector3 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshCube( Vector3 size )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -917,7 +917,7 @@ Generate sphere mesh ( Standard sphere )
*/
int lmodelsGenMeshSphere( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshSphere( float radius, int rings, int slices )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshSphere( float radius, int rings, int slices )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -944,7 +944,7 @@ Generate cylinder mesh
*/
int lmodelsGenMeshCylinder( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCylinder( float radius, float height, int slices )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshCylinder( float radius, float height, int slices )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -971,7 +971,7 @@ Generate cone/pyramid mesh
*/
int lmodelsGenMeshCone( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCone( float radius, float height, int slices )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshCone( float radius, float height, int slices )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -998,7 +998,7 @@ Generate torus mesh
*/
int lmodelsGenMeshTorus( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshTorus( float radius, float size, int radSeg, int sides )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshTorus( float radius, float size, int radSeg, int sides )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1026,7 +1026,7 @@ Generate torus mesh
*/
int lmodelsGenMeshKnot( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshKnot( float radius, float size, int radSeg, int sides )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshKnot( float radius, float size, int radSeg, int sides )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1054,7 +1054,7 @@ Generate heightmap mesh from image data
*/
int lmodelsGenMeshHeightmap( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshHeightmap( Image heightmap, Vector3 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshHeightmap( Image heightmap, Vector3 size )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1085,7 +1085,7 @@ Generate custom mesh from vertex attribute data and uploads it into a VAO ( if s
*/
int lmodelsGenMeshCustom( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isboolean( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshCustom( Mesh{} mesh, bool dynamic )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshCustom( Mesh{} mesh, bool dynamic )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1252,7 +1252,7 @@ Note! Mainly intented to be used with custom meshes.
*/
int lmodelsUpdateMesh( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateMesh( Mesh mesh, Mesh{} updatedMesh )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateMesh( Mesh mesh, Mesh{} updatedMesh )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1390,7 +1390,7 @@ Unload mesh data from CPU and GPU
*/
int lmodelsUnloadMesh( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadMesh( Mesh mesh )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadMesh( Mesh mesh )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1417,7 +1417,7 @@ Draw a 3d mesh with material and transform
*/
int lmodelsDrawMesh( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawMesh( Mesh mesh, Material material, Matrix transform )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawMesh( Mesh mesh, Material material, Matrix transform )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1446,7 +1446,7 @@ Draw multiple mesh instances with material and different transforms
*/
int lmodelsDrawMeshInstanced( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawMeshInstanced( Mesh mesh, Material material, Matrix{} transforms, int instances )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1488,7 +1488,7 @@ NOTE: Currently only works on custom mesh
*/
int lmodelsSetMeshColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMeshColor( Mesh mesh, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMeshColor( Mesh mesh, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1503,7 +1503,7 @@ int lmodelsSetMeshColor( lua_State *L ) {
Mesh *mesh = state->meshes[ meshId ];
if ( mesh->colors == NULL ) {
- TraceLog( LOG_WARNING, "Mesh %d %s", meshId, "Mesh doesn't have vertex colors allocated" );
+ TraceLog( state->logLevelInvalid, "Mesh %d %s", meshId, "Mesh doesn't have vertex colors allocated" );
lua_pushboolean( L, false );
return 1;
}
@@ -1532,7 +1532,7 @@ Export mesh data to file, returns true on success
*/
int lmodelsExportMesh( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportMesh( Mesh mesh, string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ExportMesh( Mesh mesh, string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1557,7 +1557,7 @@ Compute mesh bounding box limits
*/
int lmodelsGetMeshBoundingBox( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMeshBoundingBox( Mesh mesh )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMeshBoundingBox( Mesh mesh )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1582,7 +1582,7 @@ Compute mesh tangents
*/
int lmodelsGenMeshTangents( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenMeshTangents( Mesh mesh )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenMeshTangents( Mesh mesh )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1628,7 +1628,7 @@ Load material from table. See material table definition
*/
int lmodelsCreateMaterial( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CreateMaterial( Material{} material )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CreateMaterial( Material{} material )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1717,7 +1717,7 @@ Unload material from GPU memory ( VRAM )
*/
int lmodelsUnloadMaterial( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadMaterial( Material material )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadMaterial( Material material )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1744,7 +1744,7 @@ Set texture for a material map type ( MATERIAL_MAP_ALBEDO, MATERIAL_MAP_METALNES
*/
int lmodelsSetMaterialTexture( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !isValidTexture( L, 3, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialTexture( Material material, int mapType, Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMaterialTexture( Material material, int mapType, Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1768,7 +1768,7 @@ Set color for a material map type
*/
int lmodelsSetMaterialColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialColor( Material material, int mapType, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMaterialColor( Material material, int mapType, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1796,7 +1796,7 @@ Set value for a material map type
*/
int lmodelsSetMaterialValue( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialValue( Material material, int mapType, float value )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMaterialValue( Material material, int mapType, float value )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1824,7 +1824,7 @@ Set shader for material
*/
int lmodelsSetMaterialShader( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialShader( Material material, Shader shader )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMaterialShader( Material material, Shader shader )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1851,7 +1851,7 @@ Set material generic parameters ( if required )
*/
int lmodelsSetMaterialParams( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetMaterialParams( Material material, float{} params )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetMaterialParams( Material material, float{} params )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1893,7 +1893,7 @@ Get texture from material map type. Returns -1 if no texture.
*/
int lmodelsGetMaterialTexture( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMaterialTexture( Material material, int mapType )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMaterialTexture( Material material, int mapType )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1932,7 +1932,7 @@ Get color from material map type.
*/
int lmodelsGetMaterialColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMaterialColor( Material material, int mapType )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMaterialColor( Material material, int mapType )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1958,7 +1958,7 @@ Get color from material map type.
*/
int lmodelsGetMaterialValue( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMaterialValue( Material material, int mapType )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMaterialValue( Material material, int mapType )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1984,7 +1984,7 @@ Get material shader. Returns -1 if no shader.
*/
int lmodelsGetMaterialShader( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMaterialShader( Material material )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMaterialShader( Material material )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2016,7 +2016,7 @@ Get material parameters.
*/
int lmodelsGetMaterialParams( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetMaterialParams( Material material )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetMaterialParams( Material material )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2051,7 +2051,7 @@ Load model from files ( Meshes and materials )
*/
int lmodelsLoadModel( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadModel( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadModel( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -2080,7 +2080,7 @@ Load model from generated mesh ( Default material )
*/
int lmodelsLoadModelFromMesh( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadModelFromMesh( Mesh mesh )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadModelFromMesh( Mesh mesh )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -2108,7 +2108,7 @@ Unload model ( Including meshes ) from memory ( RAM and/or VRAM )
*/
int lmodelsUnloadModel( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadModel( Model model )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadModel( Model model )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2135,7 +2135,7 @@ Draw a model ( With texture if set )
*/
int lmodelsDrawModel( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawModel( Model model, Vector3 position, float scale, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawModel( Model model, Vector3 position, float scale, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2166,7 +2166,7 @@ Draw a model with extended parameters
int lmodelsDrawModelEx( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawModelEx( Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2197,7 +2197,7 @@ Copies material to model material. ( Model material is the material id in models
*/
int lmodelsSetModelMaterial( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetModelMaterial( Model model, Material modelMaterial, Material material )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetModelMaterial( Model model, Material modelMaterial, Material material )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2244,7 +2244,7 @@ Set material for a mesh ( Mesh and material on this model )
*/
int lmodelsSetModelMeshMaterial( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetModelMeshMaterial( Model model, int meshId, int materialId )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetModelMeshMaterial( Model model, int meshId, int materialId )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2273,7 +2273,7 @@ Draw a billboard texture
int lmodelsDrawBillboard( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) || !isValidTexture( L, 2, true ) || !lua_istable( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawBillboard( Camera camera, Texture2D texture, Vector3 position, float size, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2300,7 +2300,7 @@ Draw a billboard texture defined by source
int lmodelsDrawBillboardRec( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) || !isValidTexture( L, 2, true ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_istable( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawBillboardRec( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2330,7 +2330,7 @@ int lmodelsDrawBillboardPro( lua_State *L ) {
if ( !isValidCamera3D( L, 1, true ) || !isValidTexture( L, 2, true ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_istable( L, 5 ) || !lua_istable( L, 6 )
|| !lua_istable( L, 7 ) || !lua_isnumber( L, 8 ) || !lua_istable( L, 9 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawBillboardPro( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawBillboardPro( Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2361,7 +2361,7 @@ Set model transform matrix
*/
int lmodelsSetModelTransform( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetModelTransform( Model model, Matrix transform )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetModelTransform( Model model, Matrix transform )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2388,7 +2388,7 @@ Get model transform matrix
*/
int lmodelsGetModelTransform( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetModelTransform( Model model )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetModelTransform( Model model )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2417,7 +2417,7 @@ Load model animations from file
*/
int lmodelsLoadModelAnimations( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadModelAnimations( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadModelAnimations( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -2446,7 +2446,7 @@ Update model animation pose
*/
int lmodelsUpdateModelAnimation( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateModelAnimation( Model model, ModelAnimations animations, int animation, int frame )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2475,7 +2475,7 @@ Unload animation data
*/
int lmodelsUnloadModelAnimations( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadModelAnimations( ModelAnimations animations )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadModelAnimations( ModelAnimations animations )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2504,7 +2504,7 @@ Check model animation skeleton match
*/
int lmodelsIsModelAnimationValid( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsModelAnimationValid( Model model, ModelAnimations animations )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsModelAnimationValid( Model model, ModelAnimations animations )" );
lua_pushnil( L );
return 1;
}
@@ -2530,7 +2530,7 @@ Return modelAnimation bone count
*/
int lmodelsGetModelAnimationBoneCount( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetModelAnimationBoneCount( ModelAnimations animations, int animation )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetModelAnimationBoneCount( ModelAnimations animations, int animation )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2556,7 +2556,7 @@ Return modelAnimation frame count
*/
int lmodelsGetModelAnimationFrameCount( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetModelAnimationFrameCount( ModelAnimations animations, int animation )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetModelAnimationFrameCount( ModelAnimations animations, int animation )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2586,7 +2586,7 @@ Check collision between two spheres
*/
int lmodelsCheckCollisionSpheres( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionSpheres( Vector3 center1, float radius1, Vector3 center2, float radius2 )" );
lua_pushnil( L );
return 1;
}
@@ -2610,7 +2610,7 @@ Check collision between two bounding boxes
*/
int lmodelsCheckCollisionBoxes( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionBoxes( BoundingBox box1, BoundingBox box2 )" );
lua_pushnil( L );
return 1;
}
@@ -2632,7 +2632,7 @@ Check collision between box and sphere
*/
int lmodelsCheckCollisionBoxSphere( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionBoxSphere( BoundingBox box, Vector3 center, float radius )" );
lua_pushnil( L );
return 1;
}
@@ -2655,7 +2655,7 @@ Get collision info between ray and sphere. ( RayCollision is Lua table of { hit,
*/
int lmodelsGetRayCollisionSphere( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionSphere( Ray ray, Vector3 center, float radius )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetRayCollisionSphere( Ray ray, Vector3 center, float radius )" );
lua_pushnil( L );
return 1;
}
@@ -2678,7 +2678,7 @@ Get collision info between ray and box
*/
int lmodelsGetRayCollisionBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionBox( Ray ray, BoundingBox box )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetRayCollisionBox( Ray ray, BoundingBox box )" );
lua_pushnil( L );
return 1;
}
@@ -2700,7 +2700,7 @@ Get collision info between ray and mesh
*/
int lmodelsGetRayCollisionMesh( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetRayCollisionMesh( Ray ray, Mesh mesh, Matrix transform )" );
lua_pushnil( L );
return 1;
}
@@ -2727,7 +2727,7 @@ Get collision info between ray and triangle
*/
int lmodelsGetRayCollisionTriangle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetRayCollisionTriangle( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3 )" );
lua_pushnil( L );
return 1;
}
@@ -2752,7 +2752,7 @@ Get collision info between ray and quad
int lmodelsGetRayCollisionQuad( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetRayCollisionQuad( Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4 )" );
lua_pushnil( L );
return 1;
}
diff --git a/src/rgui.c b/src/rgui.c
index a3bdbd0..fe2806d 100644
--- a/src/rgui.c
+++ b/src/rgui.c
@@ -77,7 +77,7 @@ Set gui controls alpha ( global state ), alpha goes from 0.0f to 1.0f
*/
int lguiGuiFade( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiFade( float alpha )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiFade( float alpha )" );
lua_pushboolean( L, false );
return 1;
}
@@ -99,7 +99,7 @@ Set gui state ( global state )
*/
int lguiGuiSetState( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetState( int state )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSetState( int state )" );
lua_pushboolean( L, false );
return 1;
}
@@ -138,7 +138,7 @@ Set gui custom font ( global state )
*/
int lguiGuiSetFont( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetFont( Font font )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSetFont( Font font )" );
lua_pushboolean( L, false );
return 1;
}
@@ -178,7 +178,7 @@ Set one style property
*/
int lguiGuiSetStyle( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetStyle( int control, int property, int value )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSetStyle( int control, int property, int value )" );
lua_pushboolean( L, false );
return 1;
}
@@ -202,7 +202,7 @@ Get one style property
*/
int lguiGuiGetStyle( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiGetStyle( int control, int property )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiGetStyle( int control, int property )" );
lua_pushboolean( L, false );
return 1;
}
@@ -224,7 +224,7 @@ Load style file over global style variable ( .rgs )
*/
int lguiGuiLoadStyle( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLoadStyle( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiLoadStyle( string fileName )" );
lua_pushboolean( L, false );
return 1;
}
@@ -267,7 +267,7 @@ Window Box control, shows a window that can be closed
*/
int lguiGuiWindowBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiWindowBox( Rectangle bounds, string title )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiWindowBox( Rectangle bounds, string title )" );
lua_pushnil( L );
return 1;
}
@@ -288,7 +288,7 @@ Group Box control with text name
*/
int lguiGuiGroupBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiGroupBox( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiGroupBox( Rectangle bounds, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -310,7 +310,7 @@ Line separator control, could contain text
*/
int lguiGuiLine( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLine( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiLine( Rectangle bounds, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -332,7 +332,7 @@ Panel control, useful to group controls
*/
int lguiGuiPanel( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiPanel( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiPanel( Rectangle bounds, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -354,7 +354,7 @@ Scroll Panel control
*/
int lguiGuiScrollPanel( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiScrollPanel( Rectangle bounds, string text, Rectangle content, Vector2 scroll )" );
lua_pushboolean( L, false );
return 1;
}
@@ -382,7 +382,7 @@ Label control, shows text
*/
int lguiGuiLabel( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLabel( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiLabel( Rectangle bounds, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -404,7 +404,7 @@ Button control, returns true when clicked
*/
int lguiGuiButton( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiButton( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiButton( Rectangle bounds, string text )" );
lua_pushnil( L );
return 1;
}
@@ -425,7 +425,7 @@ Label button control, show true when clicked
*/
int lguiGuiLabelButton( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiLabelButton( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiLabelButton( Rectangle bounds, string text )" );
lua_pushnil( L );
return 1;
}
@@ -446,7 +446,7 @@ Toggle Button control, returns true when active
*/
int lguiGuiToggle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isboolean( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiToggle( Rectangle bounds, string text, bool active )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiToggle( Rectangle bounds, string text, bool active )" );
lua_pushnil( L );
return 1;
}
@@ -468,7 +468,7 @@ Toggle Group control, returns active toggle index
*/
int lguiGuiToggleGroup( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiToggleGroup( Rectangle bounds, string text, bool active )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiToggleGroup( Rectangle bounds, string text, bool active )" );
lua_pushboolean( L, false );
return 1;
}
@@ -490,7 +490,7 @@ Check Box control, returns true when active
*/
int lguiGuiCheckBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isboolean( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiCheckBox( Rectangle bounds, string text, bool checked )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiCheckBox( Rectangle bounds, string text, bool checked )" );
lua_pushnil( L );
return 1;
}
@@ -512,7 +512,7 @@ Combo Box control, returns selected item index
*/
int lguiGuiComboBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiComboBox( Rectangle bounds, string text, int active )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiComboBox( Rectangle bounds, string text, int active )" );
lua_pushnil( L );
return 1;
}
@@ -534,7 +534,7 @@ Text Box control, updates input text
*/
int lguiGuiTextBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isboolean( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiTextBox( Rectangle bounds, string text, int textSize, bool editMode )" );
lua_pushnil( L );
return 1;
}
@@ -561,7 +561,7 @@ Text Box control with multiple lines
*/
int lguiGuiTextBoxMulti( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isboolean( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiTextBoxMulti( Rectangle bounds, string text, int textSize, bool editMode )" );
lua_pushnil( L );
return 1;
}
@@ -589,7 +589,7 @@ Spinner control, returns selected value
int lguiGuiSpinner( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isboolean( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSpinner( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" );
lua_pushnil( L );
return 1;
}
@@ -616,7 +616,7 @@ Value Box control, updates input text with numbers
int lguiGuiValueBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isboolean( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiValueBox( Rectangle bounds, string text, int value, int minValue, int maxValue, bool editMode )" );
lua_pushnil( L );
return 1;
}
@@ -643,7 +643,7 @@ Slider control, returns selected value
int lguiGuiSlider( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isstring( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSlider( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" );
lua_pushnil( L );
return 1;
}
@@ -668,7 +668,7 @@ Slider Bar control, returns selected value
int lguiGuiSliderBar( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isstring( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSliderBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" );
lua_pushnil( L );
return 1;
}
@@ -693,7 +693,7 @@ Progress Bar control, shows current progress value
int lguiGuiProgressBar( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isstring( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiProgressBar( Rectangle bounds, string textLeft, string textRight, float value, float minValue, float maxValue )" );
lua_pushnil( L );
return 1;
}
@@ -717,7 +717,7 @@ Scroll Bar control
*/
int lguiGuiScrollBar( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiScrollBar( Rectangle bounds, int value, int minValue, int maxValue )" );
lua_pushnil( L );
return 1;
}
@@ -741,7 +741,7 @@ Dropdown Box control, returns selected item
*/
int lguiGuiDropdownBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isboolean( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiDropdownBox( Rectangle bounds, string text, int active, bool editMode )" );
lua_pushnil( L );
return 1;
}
@@ -765,7 +765,7 @@ Status Bar control, shows info text
*/
int lguiGuiStatusBar( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiStatusBar( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiStatusBar( Rectangle bounds, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -787,7 +787,7 @@ Dummy control for placeholders
*/
int lguiGuiDummyRec( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiDummyRec( Rectangle bounds, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiDummyRec( Rectangle bounds, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -809,7 +809,7 @@ Grid control, returns mouse cell position
*/
int lguiGuiGrid( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiGrid( Rectangle bounds, string text, float spacing, int subdivs )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiGrid( Rectangle bounds, string text, float spacing, int subdivs )" );
lua_pushboolean( L, false );
return 1;
}
@@ -836,7 +836,7 @@ List View control, returns selected list item index and scroll index
*/
int lguiGuiListView( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiListView( Rectangle bounds, string text, int scrollIndex, int active )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiListView( Rectangle bounds, string text, int scrollIndex, int active )" );
lua_pushnil( L );
return 1;
}
@@ -861,7 +861,7 @@ List View with extended parameters, returns selected list item index, scroll ind
int lguiGuiListViewEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiListViewEx( Rectangle bounds, string text, int focus, int scrollIndex, int active )" );
lua_pushnil( L );
return 1;
}
@@ -889,7 +889,7 @@ Message Box control, displays a message, returns button index ( 0 is x button )
*/
int lguiGuiMessageBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isstring( L, 3 ) || !lua_isstring( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiMessageBox( Rectangle bounds, string title, string message, string buttons )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiMessageBox( Rectangle bounds, string title, string message, string buttons )" );
lua_pushboolean( L, false );
return 1;
}
@@ -911,7 +911,7 @@ Text Input Box control, ask for text, supports secret
int lguiGuiTextInputBox( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isstring( L, 3 ) || !lua_isstring( L, 4 )
|| !lua_isstring( L, 5 ) || !lua_isnumber( L, 6 ) || !lua_isnumber( L, 7 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiTextInputBox( Rectangle bounds, string title, string message, string buttons, string text, int textMaxSize, int secretViewActive )" );
lua_pushboolean( L, false );
return 1;
}
@@ -938,7 +938,7 @@ Color Picker control ( multiple color controls )
*/
int lguiGuiColorPicker( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorPicker( Rectangle bounds, string text, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiColorPicker( Rectangle bounds, string text, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -960,7 +960,7 @@ Color Panel control
*/
int lguiGuiColorPanel( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorPanel( Rectangle bounds, string text, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiColorPanel( Rectangle bounds, string text, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -982,7 +982,7 @@ Color Bar Alpha control
*/
int lguiGuiColorBarAlpha( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorBarAlpha( Rectangle bounds, string text, float alpha )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiColorBarAlpha( Rectangle bounds, string text, float alpha )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1004,7 +1004,7 @@ Color Bar Hue control
*/
int lguiGuiColorBarHue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiColorBarHue( Rectangle bounds, string text, float value )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiColorBarHue( Rectangle bounds, string text, float value )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1030,7 +1030,7 @@ Get text with icon id prepended ( if supported )
*/
int lguiGuiIconText( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiIconText( int iconId, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiIconText( int iconId, string text )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1056,7 +1056,7 @@ Draw icon
*/
int lguiGuiDrawIcon( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiDrawIcon( int iconId, Vector2 pos, int pixelSize, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1081,7 +1081,7 @@ Set icon scale ( 1 by default )
*/
int lguiGuiSetIconScale( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetIconScale( int scale )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSetIconScale( int scale )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1103,7 +1103,7 @@ Set icon pixel value
*/
int lguiGuiSetIconPixel( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiSetIconPixel( int iconId, Vector2 pos )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiSetIconPixel( int iconId, Vector2 pos )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1126,7 +1126,7 @@ Clear icon pixel value
*/
int lguiGuiClearIconPixel( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiClearIconPixel( int iconId, Vector2 pos )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiClearIconPixel( int iconId, Vector2 pos )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1149,7 +1149,7 @@ Check icon pixel value
*/
int lguiGuiCheckIconPixel( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GuiCheckIconPixel( int iconId, Vector2 pos )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GuiCheckIconPixel( int iconId, Vector2 pos )" );
lua_pushnil( L );
return 1;
}
diff --git a/src/rlgl.c b/src/rlgl.c
index 205d314..736541d 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -17,7 +17,7 @@ Choose the current matrix to be transformed
*/
int lrlglMatrixMode( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlMatrixMode( int mode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlMatrixMode( int mode )" );
lua_pushboolean( L, false );
return 1;
}
@@ -70,7 +70,7 @@ Multiply the current matrix by a translation matrix
*/
int lrlglTranslatef( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlTranslatef( Vector3 translation )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlTranslatef( Vector3 translation )" );
lua_pushboolean( L, false );
return 1;
}
@@ -92,7 +92,7 @@ Multiply the current matrix by a rotation matrix
*/
int lrlglRotatef( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlRotatef( float angle, Vector3 rotation )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlRotatef( float angle, Vector3 rotation )" );
lua_pushboolean( L, false );
return 1;
}
@@ -115,7 +115,7 @@ Multiply the current matrix by a scaling matrix
*/
int lrlglScalef( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlScalef( Vector3 scale )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlScalef( Vector3 scale )" );
lua_pushboolean( L, false );
return 1;
}
@@ -137,7 +137,7 @@ Multiply the current matrix by another matrix
*/
int lrlglMultMatrixf( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlMultMatrixf( Matrix matrix )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlMultMatrixf( Matrix matrix )" );
lua_pushboolean( L, false );
return 1;
}
@@ -165,7 +165,7 @@ Multiply the current matrix by a perspective matrix generated by parameters
int lrlglFrustum( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlFrustum( float left, float right, float bottom, float top, float znear, float zfar )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlFrustum( float left, float right, float bottom, float top, float znear, float zfar )" );
lua_pushboolean( L, false );
return 1;
}
@@ -193,7 +193,7 @@ Multiply the current matrix by an orthographic matrix generated by parameters
int lrlglOrtho( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlOrtho( float left, float right, float bottom, float top, float znear, float zfar )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlOrtho( float left, float right, float bottom, float top, float znear, float zfar )" );
lua_pushboolean( L, false );
return 1;
}
@@ -221,7 +221,7 @@ NOTE: We store current viewport dimensions
*/
int lrlglViewport( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlViewport( Rectangle viewport )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlViewport( Rectangle viewport )" );
lua_pushboolean( L, false );
return 1;
}
@@ -247,7 +247,7 @@ Initialize drawing mode ( how to organize vertex )
*/
int lrlglBegin( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlBegin( int mode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlBegin( int mode )" );
lua_pushboolean( L, false );
return 1;
}
@@ -278,7 +278,7 @@ Define one vertex ( position )
*/
int lrlglVertex2f( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlVertex2f( Vector2 position )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlVertex2f( Vector2 position )" );
lua_pushboolean( L, false );
return 1;
}
@@ -300,7 +300,7 @@ Define one vertex ( position )
*/
int lrlglVertex3f( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlVertex3f( Vector3 position )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlVertex3f( Vector3 position )" );
lua_pushboolean( L, false );
return 1;
}
@@ -322,7 +322,7 @@ Define one vertex ( texture coordinate ) - 2 float
*/
int lrlglTexCoord2f( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlTexCoord2f( Vector2 texCoord )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlTexCoord2f( Vector2 texCoord )" );
lua_pushboolean( L, false );
return 1;
}
@@ -344,7 +344,7 @@ Define one vertex ( normal ) - 3 float
*/
int lrlglNormal3f( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlNormal3f( Vector3 normal )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlNormal3f( Vector3 normal )" );
lua_pushboolean( L, false );
return 1;
}
@@ -366,7 +366,7 @@ Define one vertex ( color ) - 4 byte
*/
int lrlglColor4ub( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlColor4ub( Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlColor4ub( Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -388,7 +388,7 @@ Define one vertex ( color ) - 3 float
*/
int lrlglColor3f( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlColor3f( Vector3 color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlColor3f( Vector3 color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -410,7 +410,7 @@ Define one vertex ( color ) - 4 float
*/
int lrlglColor4f( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlColor4f( Vector4 color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlColor4f( Vector4 color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -436,7 +436,7 @@ Select and active a texture slot
*/
int lrlglActiveTextureSlot( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlActiveTextureSlot( int slot )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlActiveTextureSlot( int slot )" );
lua_pushboolean( L, false );
return 1;
}
@@ -456,7 +456,7 @@ Enable texture
*/
int lrlglEnableTexture( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlEnableTexture( int id )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlEnableTexture( int id )" );
lua_pushboolean( L, false );
return 1;
}
@@ -487,7 +487,7 @@ Enable texture cubemap
*/
int lrlglEnableTextureCubemap( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlEnableTextureCubemap( int id )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlEnableTextureCubemap( int id )" );
lua_pushboolean( L, false );
return 1;
}
@@ -518,7 +518,7 @@ Set texture parameters ( filter, wrap )
*/
int lrlglTextureParameters( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlTextureParameters( int id, int param, int value )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlTextureParameters( int id, int param, int value )" );
lua_pushboolean( L, false );
return 1;
}
@@ -542,7 +542,7 @@ Set cubemap parameters ( filter, wrap )
*/
int lrlglCubemapParameters( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlCubemapParameters( int id, int param, int value )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlCubemapParameters( int id, int param, int value )" );
lua_pushboolean( L, false );
return 1;
}
@@ -570,7 +570,7 @@ Enable render texture (fbo)
*/
int lrlglEnableFramebuffer( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlEnableFramebuffer( int id )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlEnableFramebuffer( int id )" );
lua_pushboolean( L, false );
return 1;
}
@@ -601,7 +601,7 @@ Activate multiple draw color buffers
*/
int lrlglActiveDrawBuffers( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlActiveDrawBuffers( int count )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlActiveDrawBuffers( int count )" );
lua_pushboolean( L, false );
return 1;
}
@@ -713,7 +713,7 @@ Set face culling mode
*/
int lrlglSetCullFace( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetCullFace( int mode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlSetCullFace( int mode )" );
lua_pushboolean( L, false );
return 1;
}
@@ -755,7 +755,7 @@ Scissor test
*/
int lrlglScissor( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlScissor( Rectangle area )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlScissor( Rectangle area )" );
lua_pushboolean( L, false );
return 1;
}
@@ -799,7 +799,7 @@ Set the line drawing width
*/
int lrlglSetLineWidth( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetLineWidth( float width )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlSetLineWidth( float width )" );
lua_pushboolean( L, false );
return 1;
}
@@ -889,7 +889,7 @@ Clear color buffer with color
*/
int lrlglClearColor( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlClearColor( Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlClearColor( Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -933,7 +933,7 @@ Set blending mode
*/
int lrlglSetBlendMode( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetBlendMode( int mode )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlSetBlendMode( int mode )" );
lua_pushboolean( L, false );
return 1;
}
@@ -953,7 +953,7 @@ Set blending mode factor and equation ( using OpenGL factors )
*/
int lrlglSetBlendFactors( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetBlendFactors( int glSrcFactor, int glDstFactor, int glEquation )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlSetBlendFactors( int glSrcFactor, int glDstFactor, int glEquation )" );
lua_pushboolean( L, false );
return 1;
}
@@ -978,7 +978,7 @@ Set blending mode factors and equations separately ( using OpenGL factors )
int lrlglSetBlendFactorsSeparate( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetBlendFactorsSeparate( int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlSetBlendFactorsSeparate( int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1038,7 +1038,7 @@ Check internal buffer overflow for a given number of vertex and force a rlRender
*/
int lrlglCheckRenderBatchLimit( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlCheckRenderBatchLimit( int vCount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlCheckRenderBatchLimit( int vCount )" );
lua_pushnil( L );
return 1;
}
@@ -1057,7 +1057,7 @@ Set current texture for render batch and check buffers limits
*/
int lrlglSetTexture( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlSetTexture( int id )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlSetTexture( int id )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1081,7 +1081,7 @@ Load texture in GPU
*/
int lrlglLoadTexture( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlLoadTexture( Vector2 size, int format, int mipmapCount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlLoadTexture( Vector2 size, int format, int mipmapCount )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1104,7 +1104,7 @@ Load depth texture/renderbuffer ( to be attached to fbo )
*/
int lrlglLoadTextureDepth( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isboolean( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlLoadTextureDepth( Vector2 size, bool useRenderBuffer )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlLoadTextureDepth( Vector2 size, bool useRenderBuffer )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1126,7 +1126,7 @@ Unload texture from GPU memory
*/
int lrlglUnloadTexture( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlUnloadTexture( int id )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlUnloadTexture( int id )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1150,7 +1150,7 @@ Load an empty framebuffer
*/
int lrlglLoadFramebuffer( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlLoadFramebuffer( Vector2 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlLoadFramebuffer( Vector2 size )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1172,7 +1172,7 @@ Attach texture/renderbuffer to a framebuffer
int lrlglFramebufferAttach( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlFramebufferAttach( int fboId, int texId, int attachType, int texType, int mipLevel )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlFramebufferAttach( int fboId, int texId, int attachType, int texType, int mipLevel )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1198,7 +1198,7 @@ Verify framebuffer is complete
*/
int lrlglFramebufferComplete( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlFramebufferComplete( int id )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlFramebufferComplete( int id )" );
lua_pushnil( L );
return 1;
}
@@ -1219,7 +1219,7 @@ Delete framebuffer from GPU
*/
int lrlglUnloadFramebuffer( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.rlUnloadFramebuffer( int id )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.rlUnloadFramebuffer( int id )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/rmath.c b/src/rmath.c
index 850a88b..0c942de 100644
--- a/src/rmath.c
+++ b/src/rmath.c
@@ -25,7 +25,7 @@ Clamp float value
*/
int lmathClamp( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Clamp( float value, float min, float max )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Clamp( float value, float min, float max )" );
lua_pushboolean( L, false );
return 1;
}
@@ -48,7 +48,7 @@ Calculate linear interpolation between two floats
*/
int lmathLerp( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Lerp( float start, float end, float amount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Lerp( float start, float end, float amount )" );
lua_pushboolean( L, false );
return 1;
}
@@ -71,7 +71,7 @@ Normalize input value within input range
*/
int lmathNormalize( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Normalize( float value, float start, float end )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Normalize( float value, float start, float end )" );
lua_pushboolean( L, false );
return 1;
}
@@ -95,7 +95,7 @@ Remap input value within input range to output range
int lmathRemap( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Remap( float value, float inputStart, float inputEnd, float outputStart, float outputEnd )" );
lua_pushboolean( L, false );
return 1;
}
@@ -120,7 +120,7 @@ Wrap input value from min to max
*/
int lmathWrap( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Wrap( float value, float min, float max )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Wrap( float value, float min, float max )" );
lua_pushboolean( L, false );
return 1;
}
@@ -143,7 +143,7 @@ Check whether two given floats are almost equal
*/
int lmathFloatEquals( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.FloatEquals( float x, float y )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.FloatEquals( float x, float y )" );
lua_pushboolean( L, false );
return 1;
}
@@ -195,7 +195,7 @@ Add two vectors (v1 + v2)
*/
int lmathVector2Add( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Add( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Add( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -217,7 +217,7 @@ Add vector and float value
*/
int lmathVector2AddValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2AddValue( Vector2 v, float add )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2AddValue( Vector2 v, float add )" );
lua_pushboolean( L, false );
return 1;
}
@@ -239,7 +239,7 @@ Subtract two vectors (v1 - v2)
*/
int lmathVector2Subtract( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Subtract( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Subtract( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -261,7 +261,7 @@ Subtract vector by float value
*/
int lmathVector2SubtractValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2SubtractValue( Vector2 v, float sub )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2SubtractValue( Vector2 v, float sub )" );
lua_pushboolean( L, false );
return 1;
}
@@ -283,7 +283,7 @@ Calculate vector length
*/
int lmathVector2Length( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Length( vector2 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Length( vector2 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -304,7 +304,7 @@ Calculate vector square length
*/
int lmathVector2LengthSqr( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2LengthSqr( vector2 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2LengthSqr( vector2 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -325,7 +325,7 @@ Calculate two vectors dot product
*/
int lmathVector2DotProduct( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2DotProduct( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2DotProduct( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -347,7 +347,7 @@ Calculate distance between two vectors
*/
int lmathVector2Distance( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Distance( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Distance( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -369,7 +369,7 @@ Calculate square distance between two vectors
*/
int lmathVector2DistanceSqr( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2DistanceSqr( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2DistanceSqr( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -391,7 +391,7 @@ Calculate angle from two vectors
*/
int lmathVector2Angle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Angle( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Angle( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -415,7 +415,7 @@ Current implementation should be aligned with glm::angle.
*/
int lmathVector2LineAngle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2LineAngle( Vector2 start, Vector2 end )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2LineAngle( Vector2 start, Vector2 end )" );
lua_pushboolean( L, false );
return 1;
}
@@ -437,7 +437,7 @@ Scale vector ( multiply by value )
*/
int lmathVector2Scale( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Scale( Vector2 v, float scale )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Scale( Vector2 v, float scale )" );
lua_pushboolean( L, false );
return 1;
}
@@ -459,7 +459,7 @@ Multiply vector by vector
*/
int lmathVector2Multiply( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Multiply( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Multiply( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -481,7 +481,7 @@ Negate vector
*/
int lmathVector2Negate( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Negate( Vector2 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Negate( Vector2 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -502,7 +502,7 @@ Divide vector by vector
*/
int lmathVector2Divide( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Divide( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Divide( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -524,7 +524,7 @@ Normalize provided vector
*/
int lmathVector2Normalize( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Normalize( Vector2 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Normalize( Vector2 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -545,7 +545,7 @@ Transforms a Vector2 by a given Matrix
*/
int lmathVector2Transform( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Transform( Vector2 v, Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Transform( Vector2 v, Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -567,7 +567,7 @@ Calculate linear interpolation between two vectors
*/
int lmathVector2Lerp( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Lerp( Vector2 v1, Vector2 v2, float amount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Lerp( Vector2 v1, Vector2 v2, float amount )" );
lua_pushboolean( L, false );
return 1;
}
@@ -590,7 +590,7 @@ Calculate reflected vector to normal
*/
int lmathVector2Reflect( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Reflect( Vector2 v, Vector2 normal )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Reflect( Vector2 v, Vector2 normal )" );
lua_pushboolean( L, false );
return 1;
}
@@ -612,7 +612,7 @@ Rotate vector by angle
*/
int lmathVector2Rotate( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Rotate( Vector2 v, float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Rotate( Vector2 v, float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -634,7 +634,7 @@ Move Vector towards target
*/
int lmathVector2MoveTowards( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2MoveTowards( Vector2 v, Vector2 target, float maxDistance )" );
lua_pushboolean( L, false );
return 1;
}
@@ -657,7 +657,7 @@ Invert the given vector
*/
int lmathVector2Invert( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Invert( Vector2 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Invert( Vector2 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -679,7 +679,7 @@ min and max values specified by the given vectors
*/
int lmathVector2Clamp( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Clamp( Vector2 v, Vector2 min, Vector2 max )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Clamp( Vector2 v, Vector2 min, Vector2 max )" );
lua_pushboolean( L, false );
return 1;
}
@@ -702,7 +702,7 @@ Clamp the magnitude of the vector between two min and max values
*/
int lmathVector2ClampValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2ClampValue( Vector2 v, float min, float max )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2ClampValue( Vector2 v, float min, float max )" );
lua_pushboolean( L, false );
return 1;
}
@@ -725,7 +725,7 @@ Check whether two given vectors are almost equal
*/
int lmathVector2Equals( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector2Equals( Vector2 v1, Vector2 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2Equals( Vector2 v1, Vector2 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -777,7 +777,7 @@ Add two vectors
*/
int lmathVector3Add( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Add( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Add( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -799,7 +799,7 @@ Add vector and float value
*/
int lmathVector3AddValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3AddValue( Vector3 v, float add )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3AddValue( Vector3 v, float add )" );
lua_pushboolean( L, false );
return 1;
}
@@ -821,7 +821,7 @@ Subtract two vectors
*/
int lmathVector3Subtract( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Subtract( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Subtract( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -843,7 +843,7 @@ Subtract vector by float value
*/
int lmathVector3SubtractValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3SubtractValue( Vector3 v, float sub )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3SubtractValue( Vector3 v, float sub )" );
lua_pushboolean( L, false );
return 1;
}
@@ -865,7 +865,7 @@ Multiply vector by scalar
*/
int lmathVector3Scale( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Scale( Vector3 v, float scalar )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Scale( Vector3 v, float scalar )" );
lua_pushboolean( L, false );
return 1;
}
@@ -887,7 +887,7 @@ Multiply vector by vector
*/
int lmathVector3Multiply( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Multiply( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Multiply( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -909,7 +909,7 @@ Calculate two vectors cross product
*/
int lmathVector3CrossProduct( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3CrossProduct( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3CrossProduct( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -931,7 +931,7 @@ Calculate one vector perpendicular vector
*/
int lmathVector3Perpendicular( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Perpendicular( Vector3 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Perpendicular( Vector3 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -952,7 +952,7 @@ Calculate vector length
*/
int lmathVector3Length( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Length( Vector3 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Length( Vector3 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -973,7 +973,7 @@ Calculate vector square length
*/
int lmathVector3LengthSqr( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3LengthSqr( Vector3 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3LengthSqr( Vector3 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -994,7 +994,7 @@ Calculate two vectors dot product
*/
int lmathVector3DotProduct( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3DotProduct( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3DotProduct( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1016,7 +1016,7 @@ Calculate distance between two vectors
*/
int lmathVector3Distance( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Distance( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Distance( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1038,7 +1038,7 @@ Calculate square distance between two vectors
*/
int lmathVector3DistanceSqr( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3DistanceSqr( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3DistanceSqr( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1060,7 +1060,7 @@ Calculate angle between two vectors
*/
int lmathVector3Angle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Angle( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Angle( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1082,7 +1082,7 @@ Negate provided vector ( invert direction )
*/
int lmathVector3Negate( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Negate( Vector3 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Negate( Vector3 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1103,7 +1103,7 @@ Divide vector by vector
*/
int lmathVector3Divide( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Divide( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Divide( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1125,7 +1125,7 @@ Normalize provided vector
*/
int lmathVector3Normalize( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Normalize( Vector3 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Normalize( Vector3 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1147,7 +1147,7 @@ Gram-Schmidt function implementation
*/
int lmathVector3OrthoNormalize( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3OrthoNormalize( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1172,7 +1172,7 @@ Transforms a Vector3 by a given Matrix
*/
int lmathVector3Transform( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Transform( Vector3 v, Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Transform( Vector3 v, Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1194,7 +1194,7 @@ Transform a vector by quaternion rotation
*/
int lmathVector3RotateByQuaternion( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3RotateByQuaternion( Vector3 v, Quaternion q )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3RotateByQuaternion( Vector3 v, Quaternion q )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1216,7 +1216,7 @@ Rotates a vector around an axis
*/
int lmathVector3RotateByAxisAngle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3RotateByAxisAngle( Vector3 v, Vector3 axis, float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1239,7 +1239,7 @@ Calculate linear interpolation between two vectors
*/
int lmathVector3Lerp( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Lerp( Vector3 v1, Vector3 v2, float amount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Lerp( Vector3 v1, Vector3 v2, float amount )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1262,7 +1262,7 @@ Calculate reflected vector to normal
*/
int lmathVector3Reflect( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Reflect( Vector3 v, Vector3 normal )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Reflect( Vector3 v, Vector3 normal )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1284,7 +1284,7 @@ Get min value for each pair of components
*/
int lmathVector3Min( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Min( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Min( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1306,7 +1306,7 @@ Get max value for each pair of components
*/
int lmathVector3Max( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Max( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Max( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1329,7 +1329,7 @@ NOTE: Assumes P is on the plane of the triangle
*/
int lmathVector3Barycenter( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Barycenter( Vector3 p, Vector3 a, Vector3 b, Vector3 c )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1354,7 +1354,7 @@ NOTE: We are avoiding calling other raymath functions despite available
*/
int lmathVector3Unproject( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Unproject( Vector3 source, Matrix projection, Matrix view )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Unproject( Vector3 source, Matrix projection, Matrix view )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1377,7 +1377,7 @@ Invert the given vector
*/
int lmathVector3Invert( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Invert( Vector3 v )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Invert( Vector3 v )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1399,7 +1399,7 @@ min and max values specified by the given vectors
*/
int lmathVector3Clamp( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Clamp( Vector3 v, Vector3 min, Vector3 max )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Clamp( Vector3 v, Vector3 min, Vector3 max )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1422,7 +1422,7 @@ Clamp the magnitude of the vector between two values
*/
int lmathVector3ClampValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3ClampValue( Vector3 v, float min, float max )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3ClampValue( Vector3 v, float min, float max )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1445,7 +1445,7 @@ Check whether two given vectors are almost equal
*/
int lmathVector3Equals( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Equals( Vector3 v1, Vector3 v2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Equals( Vector3 v1, Vector3 v2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1472,7 +1472,7 @@ on the other side of the surface
*/
int lmathVector3Refract( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Vector3Refract( Vector3 v, Vector3 n, float r )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector3Refract( Vector3 v, Vector3 n, float r )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1499,7 +1499,7 @@ Compute matrix determinant
*/
int lmathMatrixDeterminant( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixDeterminant( Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixDeterminant( Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1520,7 +1520,7 @@ Get the trace of the matrix ( sum of the values along the diagonal )
*/
int lmathMatrixTrace( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixTrace( Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixTrace( Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1541,7 +1541,7 @@ Transposes provided matrix
*/
int lmathMatrixTranspose( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixTranspose( Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixTranspose( Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1562,7 +1562,7 @@ Invert provided matrix
*/
int lmathMatrixInvert( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixInvert( Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixInvert( Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1596,7 +1596,7 @@ Add two matrices
*/
int lmathMatrixAdd( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixAdd( Matrix left, Matrix right )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixAdd( Matrix left, Matrix right )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1618,7 +1618,7 @@ Subtract two matrices (left - right)
*/
int lmathMatrixSubtract( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixSubtract( Matrix left, Matrix right )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixSubtract( Matrix left, Matrix right )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1640,7 +1640,7 @@ Get two matrix multiplication
*/
int lmathMatrixMultiply( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixMultiply( Matrix left, Matrix right )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixMultiply( Matrix left, Matrix right )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1662,7 +1662,7 @@ Get translation matrix
*/
int lmathMatrixTranslate( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixTranslate( Vector3 translate )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixTranslate( Vector3 translate )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1683,7 +1683,7 @@ Create rotation matrix from axis and angle. NOTE: Angle should be provided in ra
*/
int lmathMatrixRotate( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotate( Vector3 axis, float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixRotate( Vector3 axis, float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1705,7 +1705,7 @@ Get x-rotation matrix ( angle in radians )
*/
int lmathMatrixRotateX( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateX( float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixRotateX( float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1726,7 +1726,7 @@ Get y-rotation matrix ( angle in radians )
*/
int lmathMatrixRotateY( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateY( float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixRotateY( float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1747,7 +1747,7 @@ Get z-rotation matrix ( angle in radians )
*/
int lmathMatrixRotateZ( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateZ( float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixRotateZ( float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1768,7 +1768,7 @@ Get xyz-rotation matrix ( angles in radians )
*/
int lmathMatrixRotateXYZ( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateXYZ( Vector3 angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixRotateXYZ( Vector3 angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1789,7 +1789,7 @@ Get zyx-rotation matrix ( angles in radians )
*/
int lmathMatrixRotateZYX( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixRotateZYX( Vector3 angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixRotateZYX( Vector3 angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1810,7 +1810,7 @@ Get scaling matrix
*/
int lmathMatrixScale( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixScale( Vector3 scale )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixScale( Vector3 scale )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1832,7 +1832,7 @@ Get perspective projection matrix
int lmathMatrixFrustum( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixFrustum( double left, double right, double bottom, double top, double near, double far )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixFrustum( double left, double right, double bottom, double top, double near, double far )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1858,7 +1858,7 @@ Get perspective projection matrix
*/
int lmathMatrixPerspective( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixPerspective( double fovy, double aspect, double near, double far )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixPerspective( double fovy, double aspect, double near, double far )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1883,7 +1883,7 @@ Get orthographic projection matrix
int lmathMatrixOrtho( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixOrtho( double left, double right, double bottom, double top, double near, double far )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixOrtho( double left, double right, double bottom, double top, double near, double far )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1909,7 +1909,7 @@ Get camera look-at matrix ( View matrix )
*/
int lmathMatrixLookAt( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MatrixLookAt( Vector3 eye, Vector3 target, Vector3 up )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1936,7 +1936,7 @@ Add two quaternions
*/
int lmathQuaternionAdd( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionAdd( Quaternion q1, Quaternion q2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionAdd( Quaternion q1, Quaternion q2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1958,7 +1958,7 @@ Add quaternion and float value
*/
int lmathQuaternionAddValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionAddValue( Quaternion q, float add )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionAddValue( Quaternion q, float add )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1980,7 +1980,7 @@ Subtract two quaternions
*/
int lmathQuaternionSubtract( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionSubtract( Quaternion q1, Quaternion q2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionSubtract( Quaternion q1, Quaternion q2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2002,7 +2002,7 @@ Subtract quaternion and float value
*/
int lmathQuaternionSubtractValue( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionSubtractValue( Quaternion q, float sub )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionSubtractValue( Quaternion q, float sub )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2037,7 +2037,7 @@ Computes the length of a quaternion
*/
int lmathQuaternionLength( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionLength( Quaternion q )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionLength( Quaternion q )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2058,7 +2058,7 @@ Normalize provided quaternion
*/
int lmathQuaternionNormalize( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionNormalize( Quaternion q )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionNormalize( Quaternion q )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2079,7 +2079,7 @@ Invert provided quaternion
*/
int lmathQuaternionInvert( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionInvert( Quaternion q )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionInvert( Quaternion q )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2100,7 +2100,7 @@ Calculate two quaternion multiplication
*/
int lmathQuaternionMultiply( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionMultiply( Quaternion q1, Quaternion q2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionMultiply( Quaternion q1, Quaternion q2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2122,7 +2122,7 @@ Scale quaternion by float value
*/
int lmathQuaternionScale( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionScale( Quaternion q, float mul )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionScale( Quaternion q, float mul )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2144,7 +2144,7 @@ Divide two quaternions
*/
int lmathQuaternionDivide( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionDivide( Quaternion q1, Quaternion q2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionDivide( Quaternion q1, Quaternion q2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2166,7 +2166,7 @@ Calculate linear interpolation between two quaternions
*/
int lmathQuaternionLerp( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionLerp( Quaternion q1, Quaternion q2, float amount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionLerp( Quaternion q1, Quaternion q2, float amount )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2189,7 +2189,7 @@ Calculate slerp-optimized interpolation between two quaternions
*/
int lmathQuaternionNlerp( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionNlerp( Quaternion q1, Quaternion q2, float amount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionNlerp( Quaternion q1, Quaternion q2, float amount )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2212,7 +2212,7 @@ Calculates spherical linear interpolation between two quaternions
*/
int lmathQuaternionSlerp( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionSlerp( Quaternion q1, Quaternion q2, float amount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionSlerp( Quaternion q1, Quaternion q2, float amount )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2235,7 +2235,7 @@ Calculate quaternion based on the rotation from one vector to another
*/
int lmathQuaternionFromVector3ToVector3( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromVector3ToVector3( Vector3 from, Vector3 to )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionFromVector3ToVector3( Vector3 from, Vector3 to )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2257,7 +2257,7 @@ Get a quaternion for a given rotation matrix
*/
int lmathQuaternionFromMatrix( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromMatrix( Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionFromMatrix( Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2278,7 +2278,7 @@ Get a quaternion for a given rotation matrix
*/
int lmathQuaternionToMatrix( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionToMatrix( Quaternion q )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionToMatrix( Quaternion q )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2300,7 +2300,7 @@ NOTE: angle must be provided in radians
*/
int lmathQuaternionFromAxisAngle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromAxisAngle( Vector3 axis, float angle )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionFromAxisAngle( Vector3 axis, float angle )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2322,7 +2322,7 @@ Get the rotation angle and axis for a given quaternion
*/
int lmathQuaternionToAxisAngle( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionToAxisAngle( Quaternion q )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionToAxisAngle( Quaternion q )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2349,7 +2349,7 @@ NOTE: Rotation order is ZYX
*/
int lmathQuaternionFromEuler( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionFromEuler( float pitch, float yaw, float roll )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionFromEuler( float pitch, float yaw, float roll )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2373,7 +2373,7 @@ NOTE: Angles are returned in a Vector3 struct in radians
*/
int lmathQuaternionToEuler( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionToEuler( Quaternion q )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionToEuler( Quaternion q )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2394,7 +2394,7 @@ Transform a quaternion given a transformation matrix
*/
int lmathQuaternionTransform( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionTransform( Quaternion q, Matrix mat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionTransform( Quaternion q, Matrix mat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2416,7 +2416,7 @@ Check whether two given quaternions are almost equal
*/
int lmathQuaternionEquals( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.QuaternionEquals( Quaternion q1, Quaternion q2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.QuaternionEquals( Quaternion q1, Quaternion q2 )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/shapes.c b/src/shapes.c
index a3be51b..b384271 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -1,4 +1,5 @@
#include "main.h"
+#include "state.h"
#include "shapes.h"
#include "lua_core.h"
#include "textures.h"
@@ -19,7 +20,7 @@ defining a font char white rectangle would allow drawing everything in a single
*/
int lshapesSetShapesTexture( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetShapesTexture( Texture2D texture, Rectangle source )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetShapesTexture( Texture2D texture, Rectangle source )" );
lua_pushboolean( L, false );
return 1;
}
@@ -42,7 +43,7 @@ Draw a pixel
*/
int lshapesDrawPixel( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPixel( Vector2 pos, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawPixel( Vector2 pos, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -65,7 +66,7 @@ Draw a line defining thickness
*/
int lshapesDrawLine( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawLine( Vector2 startPos, Vector2 endPos, float thickness, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -90,7 +91,7 @@ Draw a line using cubic-bezier curves in-out
*/
int lshapesDrawLineBezier( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, float thickness, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -116,7 +117,7 @@ Draw line using quadratic bezier curves with a control point
int lshapesDrawLineBezierQuad( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawLineBezier( Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thickness, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -143,7 +144,7 @@ Draw line using quadratic bezier curves with a control point
int lshapesDrawLineBezierCubic( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ||
!lua_istable( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawLineBezierCubic( Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thickness, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -170,7 +171,7 @@ Draw lines sequence
*/
int lshapesDrawLineStrip( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawLineStrip( Vector2{} points, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawLineStrip( Vector2{} points, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -205,7 +206,7 @@ Draw a color-filled circle
*/
int lshapesDrawCircle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircle( Vector2 center, float radius, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCircle( Vector2 center, float radius, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -230,7 +231,7 @@ Draw a piece of a circle
int lshapesDrawCircleSector( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ||
!lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCircleSector( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -258,7 +259,7 @@ Draw circle sector outline
int lshapesDrawCircleSectorLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ||
!lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCircleSectorLines( Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -285,7 +286,7 @@ Draw a gradient-filled circle
*/
int lshapesDrawCircleGradient( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCircleGradient( Vector2 center, float radius, Color color1, Color color2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -310,7 +311,7 @@ Draw circle outline
*/
int lshapesDrawCircleLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawCircleLines( Vector2 center, float radius, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawCircleLines( Vector2 center, float radius, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -334,7 +335,7 @@ Draw ellipse
*/
int lshapesDrawEllipse( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawEllipse( Vector2 center, float radiusH, float radiusV, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -359,7 +360,7 @@ Draw ellipse outline
*/
int lshapesDrawEllipseLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawEllipseLines( Vector2 center, float radiusH, float radiusV, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -385,7 +386,7 @@ Draw ring
int lshapesDrawRing( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ||
!lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) || !lua_istable( L, 7 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRing( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -414,7 +415,7 @@ Draw ring outline
int lshapesDrawRingLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ||
!lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) || !lua_istable( L, 7 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRingLines( Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -442,7 +443,7 @@ Draw a color-filled rectangle
*/
int lshapesDrawRectangle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangle( Rectangle rec, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangle( Rectangle rec, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -465,7 +466,7 @@ Draw a color-filled rectangle with pro parameters
*/
int lshapesDrawRectanglePro( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectanglePro( Rectangle rec, Vector2 origin, float rotation, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -490,7 +491,7 @@ Draw a vertical-gradient-filled rectangle
*/
int lshapesDrawRectangleGradientV( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangleGradientV( Rectangle rectangle, Color color1, Color color2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -514,7 +515,7 @@ Draw a horizontal-gradient-filled rectangle
*/
int lshapesDrawRectangleGradientH( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangleGradientH( Rectangle rectangle, Color color1, Color color2 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -539,7 +540,7 @@ Draw a gradient-filled rectangle with custom vertex colors
int lshapesDrawRectangleGradientEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangleGradientEx( Rectangle rectangle, Color col1, Color col2, Color col3, Color col4 )" );
lua_pushboolean( L, false );
return 1;
}
@@ -565,7 +566,7 @@ Draw rectangle outline
*/
int lshapesDrawRectangleLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleLines( Rectangle rec, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangleLines( Rectangle rec, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -588,7 +589,7 @@ Draw rectangle outline with extended parameters
*/
int lshapesDrawRectangleLinesEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangleLinesEx( Rectangle rec, int lineThick, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -612,7 +613,7 @@ Draw rectangle with rounded edges
*/
int lshapesDrawRectangleRounded( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangleRounded( Rectangle rec, float roundness, int segments, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -638,7 +639,7 @@ Draw rectangle with rounded edges outline
int lshapesDrawRectangleRoundedLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawRectangleRoundedLines( Rectangle rec, float roundness, int segments, int lineThick, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -664,7 +665,7 @@ Draw a color-filled triangle ( Vertex in counter-clockwise order! )
*/
int lshapesDrawTriangle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTriangle( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -689,7 +690,7 @@ Draw triangle outline ( Vertex in counter-clockwise order! )
*/
int lshapesDrawTriangleLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTriangleLines( Vector2 v1, Vector2 v2, Vector2 v3, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -714,7 +715,7 @@ Draw a triangle fan defined by points ( first vertex is the center )
*/
int lshapesDrawTriangleFan( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangleFan( Vector2{} points, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTriangleFan( Vector2{} points, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -749,7 +750,7 @@ Draw a triangle strip defined by points
*/
int lshapesDrawTriangleStrip( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTriangleStrip( Vector2{} points, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTriangleStrip( Vector2{} points, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -785,7 +786,7 @@ Draw a regular polygon ( Vector version )
int lshapesDrawPoly( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawPoly( Vector2 center, int sides, float radius, float rotation, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -812,7 +813,7 @@ Draw a polygon outline of n sides
int lshapesDrawPolyLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawPolyLines( Vector2 center, int sides, float radius, float rotation, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -839,7 +840,7 @@ Draw a polygon outline of n sides with extended parameters
int lshapesDrawPolyLinesEx( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ||
!lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawPolyLinesEx( Vector2 center, int sides, float radius, float rotation, float lineThick, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -870,7 +871,7 @@ Check collision between two rectangles
*/
int lshapesCheckCollisionRecs( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionRecs( Rectangle rec1, Rectangle rec2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionRecs( Rectangle rec1, Rectangle rec2 )" );
lua_pushnil( L );
return 1;
}
@@ -892,7 +893,7 @@ Check collision between two circles
*/
int lshapesCheckCollisionCircles( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionCircles( Vector2 center1, float radius1, Vector2 center2, float radius2 )" );
lua_pushnil( L );
return 1;
}
@@ -916,7 +917,7 @@ Check collision between circle and rectangle
*/
int lshapesCheckCollisionCircleRec( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionCircleRec( Vector2 center, float radius, Rectangle rec )" );
lua_pushnil( L );
return 1;
}
@@ -939,7 +940,7 @@ Check if point is inside rectangle
*/
int lshapesCheckCollisionPointRec( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointRec( Vector2 point, Rectangle rec )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionPointRec( Vector2 point, Rectangle rec )" );
lua_pushnil( L );
return 1;
}
@@ -961,7 +962,7 @@ Check if point is inside circle
*/
int lshapesCheckCollisionPointCircle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionPointCircle( Vector2 point, Vector2 center, float radius )" );
lua_pushnil( L );
return 1;
}
@@ -984,7 +985,7 @@ Check if point is inside a triangle
*/
int lshapesCheckCollisionPointTriangle( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionPointTriangle( Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3 )" );
lua_pushnil( L );
return 1;
}
@@ -1008,7 +1009,7 @@ Check if point is within a polygon described by array of vertices
*/
int lshapesCheckCollisionPointPoly( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointPoly( Vector2 point, Vector2{} points )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionPointPoly( Vector2 point, Vector2{} points )" );
lua_pushnil( L );
return 1;
}
@@ -1041,7 +1042,7 @@ Check the collision between two lines defined by two points each, returns collis
*/
int lshapesCheckCollisionLines( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionLines( Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2 )" );
lua_pushnil( L );
return 1;
}
@@ -1068,7 +1069,7 @@ Check if point belongs to line created between two points [p1] and [p2] with def
*/
int lshapesCheckCollisionPointLine( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.CheckCollisionPointLine( Vector2 point, Vector2 p1, Vector2 p2, int threshold )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.CheckCollisionPointLine( Vector2 point, Vector2 p1, Vector2 p2, int threshold )" );
lua_pushnil( L );
return 1;
}
@@ -1092,7 +1093,7 @@ Get collision rectangle for two rectangles collision
*/
int lshapesGetCollisionRec( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetCollisionRec( Rectangle rec1, Rectangle rec2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetCollisionRec( Rectangle rec1, Rectangle rec2 )" );
lua_pushnil( L );
return 1;
}
diff --git a/src/state.c b/src/state.c
index ce7d52f..abaf2ae 100644
--- a/src/state.c
+++ b/src/state.c
@@ -17,6 +17,7 @@ bool stateInit( const char *exePath ) {
state->resolution = (Vector2){ 800, 600 };
state->luaState = NULL;
state->guiFont = 0;
+ state->logLevelInvalid = LOG_ERROR;
/* Images. */
state->imageAlloc = ALLOC_PAGE_SIZE;
state->imageCount = 0;
diff --git a/src/text.c b/src/text.c
index 174b30c..bc14828 100644
--- a/src/text.c
+++ b/src/text.c
@@ -21,7 +21,7 @@ static void checkFontRealloc( int i ) {
bool validFont( size_t id ) {
if ( id < 0 || state->fontCount < id || state->fonts[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid font", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid font", id );
return false;
}
else {
@@ -57,7 +57,7 @@ Load font from file into GPU memory ( VRAM )
*/
int ltextLoadFont( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadFont( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadFont( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -85,7 +85,7 @@ Load font from file with extended parameters. Loading the default character set
*/
int ltextLoadFontEx( lua_State *L ) {
if ( !lua_isstring( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadFontEx( string fileName, int fontSize )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadFontEx( string fileName, int fontSize )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -115,7 +115,7 @@ Load font from Image ( XNA style )
*/
int ltextLoadFontFromImage( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadFontFromImage( Image image, Color key, int firstChar )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadFontFromImage( Image image, Color key, int firstChar )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -145,7 +145,7 @@ Unload Font from GPU memory ( VRAM )
*/
int ltextUnloadFont( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadFont( Font font )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadFont( Font font )" );
lua_pushboolean( L, false );
return 1;
}
@@ -176,7 +176,7 @@ Draw current FPS
*/
int ltextDrawFPS( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawFPS( Vector2 pos )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawFPS( Vector2 pos )" );
lua_pushboolean( L, false );
return 1;
}
@@ -199,7 +199,7 @@ Draw text using font and additional parameters
int ltextDrawText( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) || !lua_istable( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawText( Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -230,7 +230,7 @@ Draw text using Font and pro parameters ( rotation )
int ltextDrawTextPro( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 )
|| !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) || !lua_isnumber( L, 7 ) || !lua_istable( L, 8 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTextPro( Font font, string text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -266,7 +266,7 @@ Measure string size for Font
*/
int ltextMeasureText( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_isnumber( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.MeasureText( Font font, string text, float fontSize, float spacing )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.MeasureText( Font font, string text, float fontSize, float spacing )" );
lua_pushboolean( L, false );
return 1;
}
@@ -293,7 +293,7 @@ Get font baseSize
*/
int ltextGetFontBaseSize( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFontBaseSize( Font font )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFontBaseSize( Font font )" );
lua_pushboolean( L, false );
return 1;
}
@@ -318,7 +318,7 @@ Get font glyphCount
*/
int ltextGetFontGlyphCount( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFontGlyphCount( Font font )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFontGlyphCount( Font font )" );
lua_pushboolean( L, false );
return 1;
}
@@ -343,7 +343,7 @@ Get font glyphPadding
*/
int ltextGetFontGlyphPadding( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetFontGlyphPadding( Font font )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetFontGlyphPadding( Font font )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/textures.c b/src/textures.c
index 6e4578c..786dfd4 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -36,7 +36,7 @@ static void checkTextureRealloc( int i ) {
bool validImage( size_t id ) {
if ( id < 0 || state->imageCount < id || state->images[ id ] == NULL ) {
- TraceLog( LOG_WARNING, "%s %d", "Invalid image", id );
+ TraceLog( state->logLevelInvalid, "%s %d", "Invalid image", id );
return false;
}
else {
@@ -114,7 +114,7 @@ Load image from file into CPU memory ( RAM )
*/
int ltexturesLoadImage( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImage( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadImage( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -141,7 +141,7 @@ Load image from GPU texture data
*/
int ltexturesLoadImageFromTexture( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImageFromTexture( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadImageFromTexture( Texture2D texture )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -179,7 +179,7 @@ Unload image from CPU memory ( RAM )
*/
int ltexturesUnloadImage( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadImage( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadImage( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -206,7 +206,7 @@ Export image data to file, returns true on success
*/
int ltexturesExportImage( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportImage( Image image, string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ExportImage( Image image, string fileName )" );
lua_pushnil( L );
return 1;
}
@@ -231,7 +231,7 @@ Export image as code file defining an array of bytes, returns true on success
*/
int ltexturesExportImageAsCode( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ExportImageAsCode( Image image, string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ExportImageAsCode( Image image, string fileName )" );
lua_pushnil( L );
return 1;
}
@@ -260,7 +260,7 @@ Generate image: plain color
*/
int ltexturesGenImageColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageColor( int width, int height, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageColor( int width, int height, Color color )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -285,7 +285,7 @@ Generate image: vertical gradient
*/
int ltexturesGenImageGradientV( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageGradientV( Vector2 size, Color top, Color bottom )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageGradientV( Vector2 size, Color top, Color bottom )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -310,7 +310,7 @@ Generate image: horizontal gradient
*/
int ltexturesGenImageGradientH( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageGradientH( Vector2 size, Color left, Color right )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageGradientH( Vector2 size, Color left, Color right )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -335,7 +335,7 @@ Generate image: radial gradient
*/
int ltexturesGenImageGradientRadial( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageGradientRadial( Vector2 size, float density, Color inner, Color outer )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -361,7 +361,7 @@ Generate image: checked
*/
int ltexturesGenImageChecked( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageChecked( Vector2 size, Vector2 checks, Color col1, Color col2 )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -387,7 +387,7 @@ Generate image: white noise
*/
int ltexturesGenImageWhiteNoise( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageWhiteNoise( Vector2 size, float factor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageWhiteNoise( Vector2 size, float factor )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -411,7 +411,7 @@ Generate image: perlin noise
*/
int ltexturesGenImagePerlinNoise( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImagePerlinNoise( Vector2 size, Vector2 offset, float factor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImagePerlinNoise( Vector2 size, Vector2 offset, float factor )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -435,7 +435,7 @@ Generate image: cellular algorithm. Bigger tileSize means bigger cells
*/
int ltexturesGenImageCellular( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageCellular( Vector2 size, int tileSize )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageCellular( Vector2 size, int tileSize )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -459,7 +459,7 @@ Generate image: grayscale image from text data
*/
int ltexturesGenImageText( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isstring( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenImageText( Vector2 size, string text )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenImageText( Vector2 size, string text )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -486,7 +486,7 @@ Create an image duplicate ( useful for transformations )
*/
int ltexturesImageCopy( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageCopy( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageCopy( Image image )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -513,7 +513,7 @@ Create an image from another image piece
*/
int ltexturesImageFromImage( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFromImage( Image image, Rectangle rec )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageFromImage( Image image, Rectangle rec )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -542,7 +542,7 @@ Create an image from text ( custom sprite font )
int ltexturesImageText( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isstring( L, 2 ) || !lua_isnumber( L, 3 )
|| !lua_isnumber( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageText( Font font, string text, float fontSize, float spacing, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageText( Font font, string text, float fontSize, float spacing, Color tint )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -572,7 +572,7 @@ Convert image data to desired format
*/
int ltexturesImageFormat( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFormat( Image image, int newFormat )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageFormat( Image image, int newFormat )" );
lua_pushboolean( L, false );
return 1;
}
@@ -599,7 +599,7 @@ Convert image to POT ( power-of-two )
*/
int ltexturesImageToPOT( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageToPOT( Image image, Color fill )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageToPOT( Image image, Color fill )" );
lua_pushboolean( L, false );
return 1;
}
@@ -626,7 +626,7 @@ Crop an image to a defined rectangle
*/
int ltexturesImageCrop( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageCrop( Image image, Rectangle crop )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageCrop( Image image, Rectangle crop )" );
lua_pushboolean( L, false );
return 1;
}
@@ -653,7 +653,7 @@ Crop image depending on alpha value
*/
int ltexturesImageAlphaCrop( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaCrop( Image image, float threshold )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageAlphaCrop( Image image, float threshold )" );
lua_pushboolean( L, false );
return 1;
}
@@ -680,7 +680,7 @@ Clear alpha channel to desired color
*/
int ltexturesImageAlphaClear( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaClear( Image image, Color color, float threshold )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageAlphaClear( Image image, Color color, float threshold )" );
lua_pushboolean( L, false );
return 1;
}
@@ -708,7 +708,7 @@ Apply alpha mask to image
*/
int ltexturesImageAlphaMask( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaMask( Image image, Image alphaMask )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageAlphaMask( Image image, Image alphaMask )" );
lua_pushboolean( L, false );
return 1;
}
@@ -735,7 +735,7 @@ Premultiply alpha channel
*/
int ltexturesImageAlphaPremultiply( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageAlphaPremultiply( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageAlphaPremultiply( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -761,7 +761,7 @@ Resize image ( Bicubic scaling algorithm )
*/
int ltexturesImageResize( lua_State *L ) {
if ( !lua_isnumber( L, 1) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageResize( Image image, Vector2 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageResize( Image image, Vector2 size )" );
lua_pushboolean( L, false );
return 1;
}
@@ -788,7 +788,7 @@ Resize image ( Nearest-Neighbor scaling algorithm )
*/
int ltexturesImageResizeNN( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageResizeNN( Image image, Vector2 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageResizeNN( Image image, Vector2 size )" );
lua_pushboolean( L, false );
return 1;
}
@@ -815,7 +815,7 @@ Resize canvas and fill with color
*/
int ltexturesImageResizeCanvas( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageResizeCanvas( Image image, Vector2 size, Vector2 offset, Color fill )" );
lua_pushboolean( L, false );
return 1;
}
@@ -844,7 +844,7 @@ Generate all mipmap levels for a provided image
*/
int ltexturesImageMipmaps( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageMipmaps( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageMipmaps( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -870,7 +870,7 @@ Dither image data to 16bpp or lower ( Floyd-Steinberg dithering )
*/
int ltexturesImageDither( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDither( Image image, Color bpp )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDither( Image image, Color bpp )" );
lua_pushboolean( L, false );
return 1;
}
@@ -897,7 +897,7 @@ Flip image vertically
*/
int ltexturesImageFlipVertical( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFlipVertical( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageFlipVertical( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -923,7 +923,7 @@ Flip image horizontally
*/
int ltexturesImageFlipHorizontal( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageFlipHorizontal( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageFlipHorizontal( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -949,7 +949,7 @@ Rotate image clockwise 90deg
*/
int ltexturesImageRotateCW( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageRotateCW( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageRotateCW( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -975,7 +975,7 @@ Rotate image counter-clockwise 90deg
*/
int ltexturesImageRotateCCW( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageRotateCCW( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageRotateCCW( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1001,7 +1001,7 @@ Modify image color: tint
*/
int ltexturesImageColorTint( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorTint( Image image, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageColorTint( Image image, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1028,7 +1028,7 @@ Modify image color: invert
*/
int ltexturesImageColorInvert( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorInvert( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageColorInvert( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1054,7 +1054,7 @@ Modify image color: grayscale
*/
int ltexturesImageColorGrayscale( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorGrayscale( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageColorGrayscale( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1080,7 +1080,7 @@ Modify image color: contrast ( -100 to 100 )
*/
int ltexturesImageColorContrast( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorContrast( Image image, float contrast )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageColorContrast( Image image, float contrast )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1107,7 +1107,7 @@ Modify image color: brightness ( -255 to 255 )
*/
int ltexturesImageColorBrightness( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorBrightness( Image image, int brightness )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageColorBrightness( Image image, int brightness )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1134,7 +1134,7 @@ Modify image color: replace color
*/
int ltexturesImageColorReplace( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageColorReplace( Image image, Color color, Color replace )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageColorReplace( Image image, Color color, Color replace )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1162,7 +1162,7 @@ Load color data from image as a Color array ( RGBA - 32bit )
*/
int ltexturesLoadImageColors( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImageColors( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadImageColors( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1197,7 +1197,7 @@ Load colors palette from image as a Color array ( RGBA - 32bit )
*/
int ltexturesLoadImagePalette( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadImagePalette( Image image, int maxPaletteSize )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadImagePalette( Image image, int maxPaletteSize )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1233,7 +1233,7 @@ Get image alpha border rectangle
*/
int ltexturesGetImageAlphaBorder( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageAlphaBorder( Image image, float threshold )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetImageAlphaBorder( Image image, float threshold )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1259,7 +1259,7 @@ Get image pixel color at ( x, y ) position
*/
int ltexturesGetImageColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageColor( Image image, Vector2 pixelPos )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetImageColor( Image image, Vector2 pixelPos )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1289,7 +1289,7 @@ Clear image background with given color
*/
int ltexturesImageClearBackground( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageClearBackground( Image dst, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageClearBackground( Image dst, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1317,7 +1317,7 @@ Draw pixel within an image
*/
int ltexturesImageDrawPixel( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawPixel( Image dst, Vector2 position, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDrawPixel( Image dst, Vector2 position, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1346,7 +1346,7 @@ Draw line within an image
*/
int ltexturesImageDrawLine( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1376,7 +1376,7 @@ Draw circle within an image
*/
int ltexturesImageDrawCircle( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawCircle( Image dst, Vector2 center, int radius, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDrawCircle( Image dst, Vector2 center, int radius, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1406,7 +1406,7 @@ Draw rectangle within an image
*/
int ltexturesImageDrawRectangle( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawRectangle( Image dst, Rectangle rec, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDrawRectangle( Image dst, Rectangle rec, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1435,7 +1435,7 @@ Draw rectangle lines within an image
*/
int ltexturesImageDrawRectangleLines( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_istable( L, 2 ) || !lua_isnumber( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawRectangleLines( Image dst, Rectangle rec, int thick, Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDrawRectangleLines( Image dst, Rectangle rec, int thick, Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1466,7 +1466,7 @@ Draw a source image within a destination image ( Tint applied to source )
int ltexturesImageDraw( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_istable( L, 5 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDraw( Image dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1498,7 +1498,7 @@ Draw text ( Custom sprite font ) within an image ( Destination )
int ltexturesImageDrawTextEx( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isstring( L, 3 ) || !lua_istable( L, 4 )
|| !lua_isnumber( L, 5 ) || !lua_isnumber( L, 6 ) || !lua_istable( L, 7 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ImageDrawTextEx( Image dst, Font font, string text, Vector2 position, float fontSize, float spacing, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1534,7 +1534,7 @@ Get image size
*/
int ltexturesGetImageSize( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageSize( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetImageSize( Image image )" );
lua_pushnil( L );
return 1;
}
@@ -1561,7 +1561,7 @@ Get image mipmaps. Mipmap levels, 1 by default
*/
int ltexturesGetImageMipmaps( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageMipmaps( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetImageMipmaps( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1586,7 +1586,7 @@ Get image data format ( PixelFormat type )
*/
int ltexturesGetImageFormat( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetImageFormat( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetImageFormat( Image image )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1615,7 +1615,7 @@ Load texture from file into GPU memory ( VRAM )
*/
int ltexturesLoadTexture( lua_State *L ) {
if ( !lua_isstring( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadTexture( string fileName )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadTexture( string fileName )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1641,7 +1641,7 @@ Load texture from image data
*/
int ltexturesLoadTextureFromImage( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadTextureFromImage( Image image )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadTextureFromImage( Image image )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1668,7 +1668,7 @@ Load cubemap from image, multiple image cubemap layouts supported
*/
int ltexturesLoadTextureCubemap( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadTextureCubemap( Image image, int layout )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadTextureCubemap( Image image, int layout )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1696,7 +1696,7 @@ Load texture for rendering ( framebuffer )
*/
int ltexturesLoadRenderTexture( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.LoadRenderTexture( Vector2 size )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.LoadRenderTexture( Vector2 size )" );
lua_pushinteger( L, -1 );
return 1;
}
@@ -1719,7 +1719,7 @@ Unload texture from GPU memory ( VRAM ). NOTE! Must be texture id.
*/
int ltexturesUnloadTexture( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UnloadTexture( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UnloadTexture( Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1741,7 +1741,7 @@ Check if a texture is ready
*/
int ltexturesIsTextureReady( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.IsTextureReady( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.IsTextureReady( Texture2D texture )" );
lua_pushnil( L );
return 1;
}
@@ -1763,7 +1763,7 @@ NOTE! Should be TEXTURE_TYPE_TEXTURE. Pixel should be in format { { 255, 255, 25
*/
int ltexturesUpdateTexture( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateTexture( Texture2D texture, int{} pixels )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateTexture( Texture2D texture, int{} pixels )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1811,7 +1811,7 @@ NOTE! Should be TEXTURE_TYPE_TEXTURE. Pixel should be in format { { 255, 255, 25
*/
int ltexturesUpdateTextureRec( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.UpdateTextureRec( Texture2D texture, Rectangle rec, int{} pixels )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.UpdateTextureRec( Texture2D texture, Rectangle rec, int{} pixels )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1866,7 +1866,7 @@ Draw a Texture2D
*/
int ltexturesDrawTexture( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTexture( Texture2D texture, Vector2 position, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTexture( Texture2D texture, Vector2 position, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1890,7 +1890,7 @@ Draw a part of a texture defined by a rectangle
*/
int ltexturesDrawTextureRec( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 ) || !lua_istable( L, 4 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTextureRec( Texture2D texture, Rectangle source, Vector2 position, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1916,7 +1916,7 @@ Draw a part of a texture defined by a rectangle with "pro" parameters
int ltexturesDrawTexturePro( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTexturePro( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTexturePro( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1944,7 +1944,7 @@ Draws a texture ( or part of it ) that stretches or shrinks nicely
int ltexturesDrawTextureNPatch( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) || !lua_istable( L, 3 )
|| !lua_istable( L, 4 ) || !lua_isnumber( L, 5 ) || !lua_istable( L, 6 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextureNPatch( Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.DrawTextureNPatch( Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -1971,7 +1971,7 @@ Begin drawing to render texture
*/
int ltexturesBeginTextureMode( lua_State *L ) {
if ( !isValidRenderTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.BeginTextureMode( RenderTexture2D target )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.BeginTextureMode( RenderTexture2D target )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2004,7 +2004,7 @@ Get texture type ( TEXTURE_TYPE_TEXTURE or TEXTURE_TYPE_RENDER_TEXTURE )
*/
int ltexturesGetTextureType( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureType( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetTextureType( Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2029,7 +2029,7 @@ Generate GPU mipmaps for a texture
*/
int ltexturesGenTextureMipmaps( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GenTextureMipmaps( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GenTextureMipmaps( Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2051,7 +2051,7 @@ Set texture scaling filter mode ( TEXTURE_FILTER_POINT, TEXTURE_FILTER_BILINEAR.
*/
int ltexturesSetTextureFilter( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTextureFilter( Texture2D texture, int filter )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetTextureFilter( Texture2D texture, int filter )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2074,7 +2074,7 @@ Set texture wrapping mode ( TEXTURE_WRAP_REPEAT, TEXTURE_WRAP_CLAMP... )
*/
int ltexturesSetTextureWrap( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.SetTextureWrap( Texture2D texture, int wrap )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.SetTextureWrap( Texture2D texture, int wrap )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2097,7 +2097,7 @@ Get texture OpenGL id
*/
int ltexturesGetTextureId( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureId( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetTextureId( Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2117,7 +2117,7 @@ Get texture size
*/
int ltexturesGetTextureSize( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureSize( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetTextureSize( Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2137,7 +2137,7 @@ Get texture mipmaps. Mipmap levels, 1 by default
*/
int ltexturesGetTextureMipmaps( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureMipmaps( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetTextureMipmaps( Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2157,7 +2157,7 @@ Get texture mipmaps. Mipmap levels, 1 by default
*/
int ltexturesGetTextureFormat( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetTextureFormat( Texture2D texture )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetTextureFormat( Texture2D texture )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2181,7 +2181,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f
*/
int ltexturesFade( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.Fade( Color color, float alpha )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Fade( Color color, float alpha )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2203,7 +2203,7 @@ Returns hexadecimal value for a Color
*/
int ltexturesColorToInt( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorToInt( Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorToInt( Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2224,7 +2224,7 @@ Returns Color normalized as float [0..1]
*/
int ltexturesColorNormalize( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorNormalize( Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorNormalize( Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2245,7 +2245,7 @@ Color from normalized values [0..1]
*/
int ltexturesColorFromNormalized( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorFromNormalized( Vector4 normalized )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorFromNormalized( Vector4 normalized )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2266,7 +2266,7 @@ Returns HSV values for a Color, hue [0..360], saturation/value [0..1]
*/
int ltexturesColorToHSV( lua_State *L ) {
if ( !lua_istable( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorToHSV( Color color )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorToHSV( Color color )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2287,7 +2287,7 @@ Returns a Color from HSV values, hue [0..360], saturation/value [0..1]
*/
int ltexturesColorFromHSV( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorFromHSV( float hue, float saturation, float value )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorFromHSV( float hue, float saturation, float value )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2310,7 +2310,7 @@ Get color multiplied with another color
*/
int ltexturesColorTint( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorTint( Color color, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorTint( Color color, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2332,7 +2332,7 @@ Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
*/
int ltexturesColorBrightness( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorBrightness( Color color, float factor )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorBrightness( Color color, float factor )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2354,7 +2354,7 @@ Get color with contrast correction, contrast values between -1.0f and 1.0f
*/
int ltexturesColorContrast( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorContrast( Color color, float contrast )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorContrast( Color color, float contrast )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2376,7 +2376,7 @@ Returns color with alpha applied, alpha goes from 0.0f to 1.0f
*/
int ltexturesColorAlpha( lua_State *L ) {
if ( !lua_istable( L, 1 ) || !lua_isnumber( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorAlpha( Color color, float alpha )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorAlpha( Color color, float alpha )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2398,7 +2398,7 @@ Returns src alpha-blended into dst color with tint
*/
int ltexturesColorAlphaBlend( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.ColorAlphaBlend( Color dst, Color src, Color tint )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.ColorAlphaBlend( Color dst, Color src, Color tint )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2421,7 +2421,7 @@ Get Color structure from hexadecimal value
*/
int ltexturesGetColor( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetColor( unsigned int hexValue )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetColor( unsigned int hexValue )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2442,7 +2442,7 @@ Get pixel color from source texture
*/
int ltexturesGetPixelColor( lua_State *L ) {
if ( !isValidTexture( L, 1, true ) || !lua_istable( L, 2 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetPixelColor( Texture2D texture, Vector2 position )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetPixelColor( Texture2D texture, Vector2 position )" );
lua_pushboolean( L, false );
return 1;
}
@@ -2466,7 +2466,7 @@ Get pixel data size in bytes for certain format
*/
int ltexturesGetPixelDataSize( lua_State *L ) {
if ( !lua_isnumber( L, 1) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.GetPixelDataSize( int width, int height, int format )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.GetPixelDataSize( int width, int height, int format )" );
lua_pushboolean( L, false );
return 1;
}