Page 7 of 8

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Mon Sep 27, 2010 9:13 pm
by 8t
So how do I make it work in my program? I downloaded AnAL, but Love wont use it.

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Tue Sep 28, 2010 5:36 am
by bartbes
Did you require it in your main.lua?

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Sat Oct 09, 2010 2:33 pm
by Denny
First I'd like to thank you for the work on AnAL. I've been using it while trying to learn Löve and Lua. Today I stumbled upon a bug that has an easy fix.

At line 128-132

Code: Select all

--- Reset
-- Go back to the first frame.
function animation:reset()
    self:seek(0)
end
This doesn't work as you are using the value 0 when Lua starts with 1. Easy mistake when we're all used to start with 0. :rofl:

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Sat Oct 09, 2010 3:01 pm
by bartbes
I guess that's what you get for porting code..

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Sat Oct 09, 2010 3:22 pm
by Denny
Luckily it wasn't that bad. AnAL has helped me a lot so far so your work is really appreciated. :)

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Fri Feb 04, 2011 1:08 am
by TechnoCat
AnAL.lua:109

Code: Select all

function animation:addFrame(x, y, w, h, delay)
	local frame = love.graphics.newQuad(x, y, w, h, a.img:getWidth(), a.img:getHeight())
	table.insert(self.frames, frame)
	table.insert(self.delays, delay)
end
I think should be

Code: Select all

function animation:addFrame(x, y, w, h, delay)
	local frame = love.graphics.newQuad(x, y, w, h, self.img:getWidth(), self.img:getHeight())
	table.insert(self.frames, frame)
	table.insert(self.delays, delay)
end
Get those global a's out of here!

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Wed Jun 22, 2011 4:51 pm
by James_D.
Or just change

Code: Select all

--- Reset
-- Go back to the first frame.
function animation:reset()
	self:seek(O)
end
to

Code: Select all

--- Reset
-- Go back to the first frame.
function animation:reset()
	self:seek(1)
end
I just fixed the same bug for myself

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Sat Jul 28, 2012 3:54 pm
by clepto
how many arguments the anim:draw take?

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Tue Jul 31, 2012 12:20 pm
by Petunien

Code: Select all

animation:draw(x, y, angle, sx, sy, ox, oy)
There's a documentation: https://github.com/bartbes/love-misc-li ... /AnAL/docs

;)

Re: Animations And LÖVE (AnAL) - The animations replacement

Posted: Tue Jul 31, 2012 3:00 pm
by clepto
Thanks!