It says the class will return an SMBXMaskedImage object. This is probably not usable by any of the drawing functions. Perhaps compatibility should be added. Of course, there are probably very few situations in which it would actually be useful.
It
does work, but only if I replace the sprite with a luaImageResource object first, which really defeats the whole purpose of this anyway.
Here is a little test script I created to test this:
Code: Select all
local blockImg = Graphics.loadImage("block-1.png")
function onStart()
Graphics.sprites.block[65].img = blockImg
img = Graphics.sprites.block[65].img
end
function onTick()
Graphics.drawImage(img, 32, 568)
end
There is a custom image for block-1 in my test level's folder. Also, apparently, the returned variable must be used. using the Graphics.sprites... thing in the draw function won't work.