Re: Textured Polygons for All!
Posted: Sun Jan 27, 2013 10:35 am
Ref, you need to send it the new sizeY! The forgettable SO ANNOYING variable.
Sure, thanks. Gotta try that.xXxMoNkEyMaNxXx wrote:@IndieKid If you can get the positions on screen, it will put an image on it, so it should already support that... This basically replaces the part where you call love.graphics.polygon with a funtion that will draw the polygon and put an image on it.
Knew it was something obvious.xXxMoNkEyMaNxXx wrote:Ref, you need to send it the new sizeY! The forgettable SO ANNOYING variable.
MonkeyMan said it should be loaded as a module. Which is what I am doing.Nixola wrote:love.filesystem.load?
Code: Select all
texture=require 'Perspective'
I was upset because my uber-efficient code (at least in my eyes) had been butchered. You can obviously do whatever you want, but I can only hope that you will be efficient.This was made to be a module, PLEASE USE IT AS A MODULE
It doesn't work. Using love.filesystem.load that is. If I try to load it I get the following errors:xXxMoNkEyMaNxXx wrote:What is the problem with reloading the module?I was upset because my uber-efficient code (at least in my eyes) had been butchered. You can obviously do whatever you want, but I can only hope that you will be efficient.This was made to be a module, PLEASE USE IT AS A MODULE
Code: Select all
Error: Perspective.lua:151: bad argument #1 to 'module' (string expected, got no value)
stack traceback:
[C]: in function 'module'
Perspective.lua:151: in main chunk
main.lua:107: in function 'load'
main.lua:61: in function <main.lua:56>
[C]: in function 'xpcall'
Code: Select all
Error: draw.lua:89: attempt to index global 'texture' (a function value)
stack traceback:
draw.lua:89: in function 'drawTriangles'
draw.lua:12: in function 'drawGamePolys'
game.lua:51: in function 'draw'
main.lua:148: in function 'draw'
main.lua:86: in function <main.lua:56>
[C]: in function 'xpcall'