mirror of
https://github.com/love2d/love.git
synced 2026-08-18 11:44:15 +02:00
Removed Source:getType (resolves issue #776)
This commit is contained in:
@@ -34,11 +34,6 @@ Source::~Source()
|
||||
{
|
||||
}
|
||||
|
||||
Source::Type Source::getType() const
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
bool Source::getConstant(const char *in, Type &out)
|
||||
{
|
||||
return types.find(in, out);
|
||||
|
||||
@@ -103,7 +103,6 @@ public:
|
||||
virtual float getMaxDistance() const = 0;
|
||||
|
||||
virtual int getChannels() const = 0;
|
||||
virtual Type getType() const;
|
||||
|
||||
static bool getConstant(const char *in, Type &out);
|
||||
static bool getConstant(Type in, const char *&out);
|
||||
|
||||
@@ -331,19 +331,6 @@ int w_Source_getChannels(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int w_Source_getType(lua_State *L)
|
||||
{
|
||||
Source *t = luax_checksource(L, 1);
|
||||
Source::Type stype = t->getType();
|
||||
const char *typestr;
|
||||
|
||||
if (!Source::getConstant(stype, typestr))
|
||||
return luaL_error(L, "Unknown Source type.");
|
||||
|
||||
lua_pushstring(L, typestr);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const luaL_Reg functions[] =
|
||||
{
|
||||
{ "play", w_Source_play },
|
||||
@@ -385,7 +372,6 @@ static const luaL_Reg functions[] =
|
||||
{ "getRolloff", w_Source_getRolloff},
|
||||
|
||||
{ "getChannels", w_Source_getChannels },
|
||||
{ "getType", w_Source_getType },
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
@@ -64,7 +64,6 @@ int w_Source_getAttenuationDistances(lua_State *L);
|
||||
int w_Source_setRolloff(lua_State *L);
|
||||
int w_Source_getRolloff(lua_State *L);
|
||||
int w_Source_getChannels(lua_State *L);
|
||||
int w_Source_getType(lua_State *L);
|
||||
extern "C" int luaopen_source(lua_State *L);
|
||||
|
||||
} // audio
|
||||
|
||||
Reference in New Issue
Block a user