summaryrefslogtreecommitdiff
path: root/src/textures.c
diff options
context:
space:
mode:
authorjussi2023-04-06 19:19:44 +0300
committerjussi2023-04-06 19:19:44 +0300
commitfe15e836bd87963d10bd301a3a24652763059e0d (patch)
treea3bd6dbfcadfb3a5ba10a173d443da0595386d19 /src/textures.c
parent2526c9732e7ea35bc9ed3e43a4db77b7e6364c5a (diff)
downloadreilua-enhanced-fe15e836bd87963d10bd301a3a24652763059e0d.tar.gz
reilua-enhanced-fe15e836bd87963d10bd301a3a24652763059e0d.tar.bz2
reilua-enhanced-fe15e836bd87963d10bd301a3a24652763059e0d.zip
Switched to Raylib vertion 4.5. Removed some functions and added others. Main changes to camera3D.
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/src/textures.c b/src/textures.c
index 6398971..ab6e53f 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -1997,46 +1997,6 @@ int ltexturesDrawTextureRec( lua_State *L ) {
}
/*
-> success = RL.DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint )
-
-Draw part of a texture ( defined by a rectangle ) with rotation and scale tiled into dest
-
-- Failure return false
-- Success return true
-*/
-int ltexturesDrawTextureTiled( lua_State *L ) {
- if ( !lua_isnumber( L, -7 ) || !lua_istable( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 )
- || !lua_isnumber( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTextureTiled( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint )" );
- lua_pushboolean( L, false );
- return 1;
- }
- Color color = uluaGetColor( L );
- lua_pop( L, 1 );
- float scale = lua_tonumber( L, -1 );
- lua_pop( L, 1 );
- float rot = lua_tonumber( L, -1 );
- lua_pop( L, 1 );
- Vector2 origin = uluaGetVector2( L );
- lua_pop( L, 1 );
- Rectangle dstRect = uluaGetRectangle( L );
- lua_pop( L, 1 );
- Rectangle srcRect = uluaGetRectangle( L );
- lua_pop( L, 1 );
- size_t texId = lua_tointeger( L, -1 );
-
- if ( !validSourceTexture( texId ) ) {
- lua_pushboolean( L, false );
- return 1;
- }
-
- DrawTextureTiled( *texturesGetSourceTexture( texId ), srcRect, dstRect, origin, rot, scale, color );
- lua_pushboolean( L, true );
-
- return 1;
-}
-
-/*
> success = RL.DrawTexturePro( Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint )
Draw a part of a texture defined by a rectangle with "pro" parameters
@@ -2113,64 +2073,6 @@ int ltexturesDrawTextureNPatch( lua_State *L ) {
}
/*
-> success = RL.DrawTexturePoly( Texture2D texture, Vector2 center, Vector2{} points, Vector2{} texcoords, int pointsCount, Color tint )
-
-Draw a textured polygon ( Convex )
-
-- Failure return false
-- Success return true
-*/
-int ltexturesDrawTexturePoly( lua_State *L ) {
- if ( !lua_isnumber( L, -6 ) || !lua_istable( L, -5 ) || !lua_istable( L, -4 )
- || !lua_istable( L, -3 ) || !lua_isnumber( L, -2 ) || !lua_istable( L, -1 ) ) {
- TraceLog( LOG_WARNING, "%s", "Bad call of function. RL.DrawTexturePoly( Texture2D texture, Vector2 center, Vector2 points{}, Vector2 texcoords{}, int pointsCount, Color tint )" );
- lua_pushboolean( L, false );
- return 1;
- }
- Color color = uluaGetColor( L );
- lua_pop( L, 1 );
- int pointsCount = lua_tointeger( L, -1 );
- lua_pop( L, 1 );
- Vector2 texCoords[ pointsCount ];
-
- int t = lua_gettop( L ), i = 0;
- lua_pushnil( L );
-
- while ( lua_next( L, t ) != 0 ) {
- texCoords[i] = uluaGetVector2( L );
- i++;
- lua_pop( L, 1 );
- }
- lua_pop( L, 1 );
-
- Vector2 points[ pointsCount ];
-
- t = lua_gettop( L );
- i = 0;
- lua_pushnil( L );
-
- while ( lua_next( L, t ) != 0 ) {
- points[i] = uluaGetVector2( L );
- i++;
- lua_pop( L, 1 );
- }
- lua_pop( L, 1 );
- Vector2 center = uluaGetVector2( L );
- lua_pop( L, 1 );
- size_t texId = lua_tointeger( L, -1 );
-
- if ( !validSourceTexture( texId ) ) {
- lua_pushboolean( L, false );
- return 1;
- }
-
- DrawTexturePoly( *texturesGetSourceTexture( texId ), center, points, texCoords, pointsCount, color );
- lua_pushboolean( L, true );
-
- return 1;
-}
-
-/*
> success = RL.BeginTextureMode( RenderTexture2D target )
Begin drawing to render texture