Clearing with "bump.lua": is it possible?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
AlmightyByron
Prole
Posts: 5
Joined: Tue Apr 15, 2014 6:35 pm
Location: Southampton
Contact:

Clearing with "bump.lua": is it possible?

Post by AlmightyByron »

Currently I am working on a game, which uses STI and Bump.lua for map handling and map collision. Now, my problem is with regards bump.lua -- when my LoadMap() function runs, it keeps the old Bump data from the last map and the new map. This is quite a large problem. My question is this: is there any way of clearing Bump rectangles? I've searched through the documentation and forums, but it hasn't come up. If there isn't one: is anyone able to put me in the right direction for coding one?
The twit who codes.
http://almightybyron.co.uk - Website
User avatar
I~=Spam
Party member
Posts: 206
Joined: Fri Dec 14, 2012 11:59 pm

Re: Clearing with "bump.lua": is it possible?

Post by I~=Spam »

call bump.initialize() again every time you load a new map. Glancing at the code it seems that bump.initialize() clears all items in bump.lua.
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Clearing with "bump.lua": is it possible?

Post by kikito »

I~=Spam wrote:call bump.initialize() again every time you load a new map. Glancing at the code it seems that bump.initialize() clears all items in bump.lua.
Yes, that's the way to do it in bump 1.0
When I write def I mean function.
AlmightyByron
Prole
Posts: 5
Joined: Tue Apr 15, 2014 6:35 pm
Location: Southampton
Contact:

Re: Clearing with "bump.lua" and map loading bugs.

Post by AlmightyByron »

I~=Spam wrote:call bump.initialize() again every time you load a new map. Glancing at the code it seems that bump.initialize() clears all items in bump.lua.
Brilliant -- thank you! I did have another bug, but I fixed it myself.
The twit who codes.
http://almightybyron.co.uk - Website
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 3 guests