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

Showcase your libraries, tools and other projects that help your fellow love users.
8t
Prole
Posts: 8
Joined: Sat Sep 25, 2010 6:30 pm

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

Post by 8t » Mon Sep 27, 2010 9:13 pm

So how do I make it work in my program? I downloaded AnAL, but Love wont use it.

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes » Tue Sep 28, 2010 5:36 am

Did you require it in your main.lua?

Denny
Prole
Posts: 2
Joined: Sat Oct 09, 2010 2:27 pm

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

Post by Denny » Sat Oct 09, 2010 2:33 pm

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:

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

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

Post by bartbes » Sat Oct 09, 2010 3:01 pm

I guess that's what you get for porting code..

Denny
Prole
Posts: 2
Joined: Sat Oct 09, 2010 2:27 pm

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

Post by Denny » Sat Oct 09, 2010 3:22 pm

Luckily it wasn't that bad. AnAL has helped me a lot so far so your work is really appreciated. :)

User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

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

Post by TechnoCat » Fri Feb 04, 2011 1:08 am

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!

James_D.
Prole
Posts: 2
Joined: Wed Jun 22, 2011 10:34 am

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

Post by James_D. » Wed Jun 22, 2011 4:51 pm

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

clepto
Prole
Posts: 35
Joined: Wed Jul 25, 2012 10:20 pm

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

Post by clepto » Sat Jul 28, 2012 3:54 pm

how many arguments the anim:draw take?

User avatar
Petunien
Party member
Posts: 191
Joined: Fri Feb 03, 2012 8:02 pm
Location: South Tyrol (Italy)

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

Post by Petunien » Tue Jul 31, 2012 12:20 pm

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

;)
"Docendo discimus" - Lucius Annaeus Seneca

clepto
Prole
Posts: 35
Joined: Wed Jul 25, 2012 10:20 pm

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

Post by clepto » Tue Jul 31, 2012 3:00 pm

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests