Expose love.markDeprecated.

Arguments are (level, name, apitype, deprecationtype [, replacementname]). Call it inside a function.
This commit is contained in:
Alex Szpakowski
2021-06-06 18:16:56 -03:00
parent 199632e791
commit 5ef1709c02
7 changed files with 66 additions and 13 deletions
+6 -6
View File
@@ -1195,25 +1195,25 @@ int w_newVolumeTexture(lua_State *L)
int w_newImage(lua_State *L)
{
//luax_markdeprecated(L, "love.graphics.newImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newTexture");
//luax_markdeprecated(L, 1, "love.graphics.newImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newTexture");
return w_newTexture(L);
}
int w_newCubeImage(lua_State *L)
{
//luax_markdeprecated(L, "love.graphics.newCubeImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newCubeTexture");
//luax_markdeprecated(L, 1, "love.graphics.newCubeImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newCubeTexture");
return w_newCubeTexture(L);
}
int w_newArrayImage(lua_State *L)
{
//luax_markdeprecated(L, "love.graphics.newArrayImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newArrayTexture");
//luax_markdeprecated(L, 1, "love.graphics.newArrayImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newArrayTexture");
return w_newArrayTexture(L);
}
int w_newVolumeImage(lua_State *L)
{
//luax_markdeprecated(L, "love.graphics.newVolumeImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newVolumeTexture");
//luax_markdeprecated(L, 1, "love.graphics.newVolumeImage", API_FUNCTION, DEPRECATED_RENAMED, "love.graphics.newVolumeTexture");
return w_newVolumeTexture(L);
}
@@ -2644,7 +2644,7 @@ static int w__getFormats(lua_State *L, int idx, bool (*isFormatSupported)(PixelF
int w_getCanvasFormats(lua_State *L)
{
luax_markdeprecated(L, "love.graphics.getCanvasFormats", API_FUNCTION, DEPRECATED_REPLACED, "love.graphics.getTextureFormats");
luax_markdeprecated(L, 1, "love.graphics.getCanvasFormats", API_FUNCTION, DEPRECATED_REPLACED, "love.graphics.getTextureFormats");
bool (*supported)(PixelFormat);
@@ -2681,7 +2681,7 @@ int w_getCanvasFormats(lua_State *L)
int w_getImageFormats(lua_State *L)
{
luax_markdeprecated(L, "love.graphics.getImageFormats", API_FUNCTION, DEPRECATED_REPLACED, "love.graphics.getTextureFormats");
luax_markdeprecated(L, 1, "love.graphics.getImageFormats", API_FUNCTION, DEPRECATED_REPLACED, "love.graphics.getTextureFormats");
const auto supported = [](PixelFormat format) -> bool
{