summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjussi2023-10-15 18:54:19 +0300
committerjussi2023-10-15 18:54:19 +0300
commit7af7e7003131e182efb30bac8c1ff06ac1d667d6 (patch)
treeebc0d3dec4255165da0c67853213664b5e1d8e36 /src
parentc3352b8ed7becfef5a175f763241d77afdf24b02 (diff)
downloadreilua-enhanced-7af7e7003131e182efb30bac8c1ff06ac1d667d6.tar.gz
reilua-enhanced-7af7e7003131e182efb30bac8c1ff06ac1d667d6.tar.bz2
reilua-enhanced-7af7e7003131e182efb30bac8c1ff06ac1d667d6.zip
Renamed start, end arguments to a, b to avoid using Lua keyword end in argument names.
Diffstat (limited to 'src')
-rw-r--r--src/models.c2
-rw-r--r--src/rmath.c12
-rw-r--r--src/textures.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/models.c b/src/models.c
index 380d8cf..89ea810 100644
--- a/src/models.c
+++ b/src/models.c
@@ -1661,7 +1661,7 @@ int lmodelsCreateMaterial( lua_State *L ) {
lua_pushnil( L );
while ( lua_next( L, t4 ) != 0 ) {
- if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 && lua_isnumber( L, -1 ) ) {
+ if ( strcmp( "texture", (char*)lua_tostring( L, -2 ) ) == 0 && isValidTexture( L, lua_gettop( L ), true ) ) {
state->materials[i]->maps[map].texture = uluaGetTexture( L, lua_gettop( L ) );
}
else if ( strcmp( "color", (char*)lua_tostring( L, -2 ) ) == 0 && lua_istable( L, -1 ) ) {
diff --git a/src/rmath.c b/src/rmath.c
index 0c942de..6effbd5 100644
--- a/src/rmath.c
+++ b/src/rmath.c
@@ -39,7 +39,7 @@ int lmathClamp( lua_State *L ) {
}
/*
-> result = RL.Lerp( float start, float end, float amount )
+> result = RL.Lerp( float a, float b, float amount )
Calculate linear interpolation between two floats
@@ -48,7 +48,7 @@ Calculate linear interpolation between two floats
*/
int lmathLerp( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Lerp( float start, float end, float amount )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Lerp( float a, float b, float amount )" );
lua_pushboolean( L, false );
return 1;
}
@@ -62,7 +62,7 @@ int lmathLerp( lua_State *L ) {
}
/*
-> result = RL.Normalize( float value, float start, float end )
+> result = RL.Normalize( float value, float a, float b )
Normalize input value within input range
@@ -71,7 +71,7 @@ Normalize input value within input range
*/
int lmathNormalize( lua_State *L ) {
if ( !lua_isnumber( L, 1 ) || !lua_isnumber( L, 2 ) || !lua_isnumber( L, 3 ) ) {
- TraceLog( state->logLevelInvalid, "%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 a, float b )" );
lua_pushboolean( L, false );
return 1;
}
@@ -404,7 +404,7 @@ int lmathVector2Angle( lua_State *L ) {
}
/*
-> result = RL.Vector2LineAngle( Vector2 start, Vector2 end )
+> result = RL.Vector2LineAngle( Vector2 a, Vector2 b )
Calculate angle defined by a two vectors line.
NOTE: Parameters need to be normalized.
@@ -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( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2LineAngle( Vector2 start, Vector2 end )" );
+ TraceLog( state->logLevelInvalid, "%s", "Bad call of function. RL.Vector2LineAngle( Vector2 a, Vector2 b )" );
lua_pushboolean( L, false );
return 1;
}
diff --git a/src/textures.c b/src/textures.c
index 29c8476..061e1b2 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -1365,7 +1365,7 @@ int ltexturesImageDrawPixel( lua_State *L ) {
}
/*
-> success = RL.ImageDrawLine( Image dst, Vector2 start, Vector2 end, Color color )
+> success = RL.ImageDrawLine( Image dst, Vector2 a, Vector2 b, Color color )
Draw line within an image
@@ -1374,7 +1374,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( state->logLevelInvalid, "%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 a, Vector2 b, Color color )" );
lua_pushboolean( L, false );
return 1;
}