mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Fixed some constants
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([love], [20090906-6a275e4b909a])
|
AC_INIT([love], [20091011-ae1750d78436])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_AUX_DIR([platform/unix])
|
AC_CONFIG_AUX_DIR([platform/unix])
|
||||||
AC_CONFIG_MACRO_DIR([platform/unix/m4])
|
AC_CONFIG_MACRO_DIR([platform/unix/m4])
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace filesystem
|
|||||||
{"c", File::CLOSED},
|
{"c", File::CLOSED},
|
||||||
{"r", File::READ},
|
{"r", File::READ},
|
||||||
{"w", File::WRITE},
|
{"w", File::WRITE},
|
||||||
{"w+", File::APPEND},
|
{"a", File::APPEND},
|
||||||
};
|
};
|
||||||
|
|
||||||
StringMap<File::Mode, File::MODE_MAX_ENUM> File::modes(File::modeEntries, sizeof(File::modeEntries));
|
StringMap<File::Mode, File::MODE_MAX_ENUM> File::modes(File::modeEntries, sizeof(File::modeEntries));
|
||||||
|
|||||||
@@ -383,8 +383,8 @@ namespace opengl
|
|||||||
int w_getBlendMode(lua_State * L)
|
int w_getBlendMode(lua_State * L)
|
||||||
{
|
{
|
||||||
Graphics::BlendMode mode = instance->getBlendMode();
|
Graphics::BlendMode mode = instance->getBlendMode();
|
||||||
const char * str = luaL_checkstring(L, 1);
|
const char * str;
|
||||||
if(!Graphics::getConstant(str, mode))
|
if(!Graphics::getConstant(mode, str))
|
||||||
return luaL_error(L, "Invalid blend mode: %s", str);
|
return luaL_error(L, "Invalid blend mode: %s", str);
|
||||||
|
|
||||||
lua_pushstring(L, str);
|
lua_pushstring(L, str);
|
||||||
@@ -394,9 +394,9 @@ namespace opengl
|
|||||||
int w_getColorMode(lua_State * L)
|
int w_getColorMode(lua_State * L)
|
||||||
{
|
{
|
||||||
Graphics::ColorMode mode = instance->getColorMode();
|
Graphics::ColorMode mode = instance->getColorMode();
|
||||||
const char * str = luaL_checkstring(L, 1);
|
const char * str;
|
||||||
if(!Graphics::getConstant(str, mode))
|
if(!Graphics::getConstant(mode, str))
|
||||||
return luaL_error(L, "Invalid blend mode: %s", str);
|
return luaL_error(L, "Invalid color mode: %s", str);
|
||||||
|
|
||||||
lua_pushstring(L, str);
|
lua_pushstring(L, str);
|
||||||
return 1;
|
return 1;
|
||||||
@@ -459,7 +459,10 @@ namespace opengl
|
|||||||
|
|
||||||
int w_getLineStyle(lua_State * L)
|
int w_getLineStyle(lua_State * L)
|
||||||
{
|
{
|
||||||
lua_pushinteger(L, instance->getLineStyle());
|
Graphics::LineStyle style = instance->getLineStyle();
|
||||||
|
const char *str;
|
||||||
|
Graphics::getConstant(style, str);
|
||||||
|
lua_pushstring(L, str);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user