summaryrefslogtreecommitdiff
path: root/src/textures.c
diff options
context:
space:
mode:
authorjussi2023-10-11 15:19:54 +0300
committerjussi2023-10-11 15:19:54 +0300
commitc3352b8ed7becfef5a175f763241d77afdf24b02 (patch)
treea1755b6b513c165361dbf7cd5ccfffffd62fa2f1 /src/textures.c
parent8311dfd354f136333a6fc5084ef2f7a637339959 (diff)
downloadreilua-enhanced-c3352b8ed7becfef5a175f763241d77afdf24b02.tar.gz
reilua-enhanced-c3352b8ed7becfef5a175f763241d77afdf24b02.tar.bz2
reilua-enhanced-c3352b8ed7becfef5a175f763241d77afdf24b02.zip
isValidRenderTexture fix.
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/textures.c b/src/textures.c
index 9fff0d1..29c8476 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -102,6 +102,7 @@ void texturesFreeTexture( size_t id ) {
state->textures[id] = NULL;
}
}
+
/*
## Textures - Image Loading
*/
@@ -1329,7 +1330,6 @@ int ltexturesImageClearBackground( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageClearBackground( state->images[ imageId ], color );
lua_pushboolean( L, true );
@@ -1358,7 +1358,6 @@ int ltexturesImageDrawPixel( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDrawPixelV( state->images[ imageId ], position, color );
lua_pushboolean( L, true );
@@ -1388,7 +1387,6 @@ int ltexturesImageDrawLine( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDrawLineV( state->images[ imageId ], start, end, color );
lua_pushboolean( L, true );
@@ -1418,7 +1416,6 @@ int ltexturesImageDrawCircle( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDrawCircleV( state->images[ imageId ], center, radius, color );
lua_pushboolean( L, true );
@@ -1448,7 +1445,6 @@ int ltexturesImageDrawCircleLines( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDrawCircleLinesV( state->images[ imageId ], center, radius, color );
lua_pushboolean( L, true );
@@ -1477,7 +1473,6 @@ int ltexturesImageDrawRectangle( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDrawRectangleRec( state->images[ imageId ], rec, color );
lua_pushboolean( L, true );
@@ -1507,7 +1502,6 @@ int ltexturesImageDrawRectangleLines( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDrawRectangleLines( state->images[ imageId ], rec, thick, color );
lua_pushboolean( L, true );
@@ -1530,7 +1524,7 @@ int ltexturesImageDraw( lua_State *L ) {
return 1;
}
size_t imageDstId = lua_tointeger( L, 1 );
- size_t imageSrcId = lua_tointeger( L, 2);
+ size_t imageSrcId = lua_tointeger( L, 2 );
Rectangle srcRec = uluaGetRectangleIndex( L, 3 );
Rectangle dstRec = uluaGetRectangleIndex( L, 4 );
Color tint = uluaGetColorIndex( L, 5 );
@@ -1539,7 +1533,6 @@ int ltexturesImageDraw( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDraw( state->images[ imageDstId ], *state->images[ imageSrcId ], srcRec, dstRec, tint );
lua_pushboolean( L, true );
@@ -1572,7 +1565,6 @@ int ltexturesImageDrawTextEx( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
-
ImageDrawTextEx( state->images[ imageId ], *state->fonts[ fontId ], lua_tostring( L, 3 ), position, fontSize, spacing, tint );
lua_pushboolean( L, true );
@@ -1603,7 +1595,6 @@ int ltexturesGetImageSize( lua_State *L ) {
lua_pushnil( L );
return 1;
}
-
Image *image = state->images[ imageId ];
uluaPushVector2( L, (Vector2){ image->width, image->height } );