mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Move replacePixels from Image to Texture
This commit is contained in:
@@ -62,16 +62,7 @@ int w_ParticleSystem_setTexture(lua_State *L)
|
||||
int w_ParticleSystem_getTexture(lua_State *L)
|
||||
{
|
||||
ParticleSystem *t = luax_checkparticlesystem(L, 1);
|
||||
Texture *tex = t->getTexture();
|
||||
|
||||
// FIXME: big hack right here.
|
||||
if (dynamic_cast<Image *>(tex) != nullptr)
|
||||
luax_pushtype(L, Image::type, tex);
|
||||
else if (dynamic_cast<Canvas *>(tex) != nullptr)
|
||||
luax_pushtype(L, Canvas::type, tex);
|
||||
else
|
||||
return luaL_error(L, "Unable to determine texture type.");
|
||||
|
||||
luax_pushtype(L, t->getTexture());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user